You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
indeed, because that's what it is. $_GET['id'] could be undefined, or assign to strings or arbitrary arrays. There is an option to make it less strict though.
Sure, but what is troubling is that the message is hard to understand. What does Top mean? Does it mean undefined or string or array? For user defined arrays the type is much clearer.
Also, related to this, the following code does not produce any errors:
<?php
if (!is_array($_GET['id'])) {
echo $_GET['id'];
}
and should warn about $_GET[id] being undefined.
CaptainEmerson
pushed a commit
to SoftwareEngineeringToolDemos/FSE-2010-Phantm
that referenced
this issue
Jun 24, 2016
The following code will produce the error
Notice: Type mismatch: expected: Array["id" => Any, ...], found: Array["id" => Top]
echo $_GET['id'];
The text was updated successfully, but these errors were encountered: