Closed garretthyder closed 4 years ago
Sounds good, if you'd like we can chain it with an array_key_exists but it shouldn't be needed as empty will return false if the index doesn't exist. "No warning is generated if the variable does not exist. That means empty() is essentially the concise equivalent to !isset($var) || $var == false." Reference: https://www.php.net/manual/en/function.empty.php
Testing the following all produce the correct message;
php ayuco set version
php ayuco set version:
php ayuco set version: 1.0.0
*Previously with the isset method the 2nd & 3rd would reset the version to an empty string as $object[1] was set but empty.
Update not-isset to empty on the second parameter check, fixing #84