We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3379b3 commit 265ab5cCopy full SHA for 265ab5c
Samples/tanModesAndMedia.php
@@ -25,7 +25,7 @@
25
26
echo "Which one do you want to use? Index:\n";
27
$tanModeIndex = trim(fgets(STDIN));
28
-if (empty($tanModeIndex) || !array_key_exists(intval($tanModeIndex), $tanModes)) {
+if (!is_numeric($tanModeIndex) || !array_key_exists(intval($tanModeIndex), $tanModes)) {
29
echo 'Invalid index!';
30
return;
31
}
@@ -49,7 +49,7 @@
49
50
51
$tanMediumIndex = trim(fgets(STDIN));
52
- if (empty($tanMediumIndex) || !array_key_exists(intval($tanMediumIndex), $tanMedia)) {
+ if (!is_numeric($tanMediumIndex) || !array_key_exists(intval($tanMediumIndex), $tanMedia)) {
53
54
55
0 commit comments