Closed Nightfirecat closed 8 years ago
When trying to get dyes, if the character has no dyes, PHP will raise a notice regarding the array index not being set. Ex: https://github.com/Nightfirecat/RealmEye-API/blob/master/0.2/index.php#L164
Solution would be to change from this structure:
$var = ($temp = $array[0]) ? $temp : "";
to the following:
if (!isset($array[0])) { $array[0] = ""; } $var = $array[0];
I feel this can be written more succinctly (eg. only write $array[0] once), but don't know how I'd do that offhand.
$array[0]
Looks like the only other occurrence is at L166.
Also happens at:
bp
pet
last_seen
last_server
When trying to get dyes, if the character has no dyes, PHP will raise a notice regarding the array index not being set. Ex: https://github.com/Nightfirecat/RealmEye-API/blob/master/0.2/index.php#L164
Solution would be to change from this structure:
to the following:
I feel this can be written more succinctly (eg. only write
$array[0]
once), but don't know how I'd do that offhand.