mirror of
https://codeberg.org/vlw/functionflags.git
synced 2025-09-13 19:03:41 +02:00
fix: get flags return type (#3)
This commit is contained in:
parent
8296bf0efd
commit
cb38a4007f
1 changed files with 2 additions and 1 deletions
|
@ -34,7 +34,8 @@
|
||||||
// Get args array from stack entry by index
|
// Get args array from stack entry by index
|
||||||
$args = $stack[$idx]["args"];
|
$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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---- */
|
/* ---- */
|
||||||
|
|
Loading…
Add table
Reference in a new issue