mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-30 20:04:30 +01:00
in_array() should now be compatible with php3.
This commit is contained in:
parent
50175afd99
commit
9dd8a8d708
@ -231,7 +231,7 @@
|
|||||||
* Searches haystack for needle and returns TRUE if it is found in the array, FALSE
|
* Searches haystack for needle and returns TRUE if it is found in the array, FALSE
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
function in_array($needle, $haystack, $strict = False)
|
function in_array($needle, $haystack='', $strict = False)
|
||||||
{
|
{
|
||||||
if(is_array($haystack) && count($haystack))
|
if(is_array($haystack) && count($haystack))
|
||||||
{
|
{
|
||||||
@ -244,6 +244,10 @@
|
|||||||
}
|
}
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
elseif($haystack=='')
|
||||||
|
{
|
||||||
|
return False;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* is_bool (PHP 4 >= 4.0.0)
|
/* is_bool (PHP 4 >= 4.0.0)
|
||||||
|
Loading…
Reference in New Issue
Block a user