fix: get flags return type

This commit is contained in:
Victor Westerlund 2023-03-27 18:02:44 +02:00
parent 8296bf0efd
commit 373e36ef4f

View file

@ -34,7 +34,8 @@
// Get args array from stack entry by index
$args = $stack[$idx]["args"];
return !empty($args) ? end($args) : null;
// Return null if no arguments provided or not a valid int flag
return !empty($args) && is_int(end($args)) ? end($args) : null;
}
/* ---- */