Details
Description
The SolusVM module makes an API call when staff or client view the "Stats" tab. The API will return data for the API call vserver-infoall that includes different information, along with bandwidth. An example of the bandwidth returned is:
<bandwidth>161061273600,65023881,160996249719,0</bandwidth>
The 1st value is the bandwidth limit, the 2nd value is bandwidth used. If no bandwidth is used, we would expect this value to be 0. However, some people have been reporting a white screen error of the following:
[2024-10-08T19:45:43.643223+00:00] general.ERROR: Uncaught Exception TypeError: "Unsupported operand types: string / int" at /var/www/html/components/modules/solusvm/solusvm.php line 2443
{"exception":"[object] (TypeError(code: 0): Unsupported operand types: string / int at /var/www/html/components/modules/solusvm/solusvm.php:2443)"}The reason is that the 2nd value, the used bandwidth, is empty looking like this:
<bandwidth>161061273600,,160996249719,0</bandwidth>
We should add an exception where we treat no value as 0.
Activity
Field | Original Value | New Value |
---|---|---|
Rank | Ranked higher |
Rank | Ranked higher |
Sprint | 5.11.0 Sprint 6 [ 206 ] |
Rank | Ranked higher |