Bug #75389 [Opn]: function 'isset' not found when using array_filter
| From: | g dot sokol99 at g-sokol dot info | Date: | Mon, 16 Oct 2017 15:54:23 +0000 |
| Subject: | Bug #75389 [Opn]: function 'isset' not found when using array_filter | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211723@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75389&edit=1
ID: 75389
User updated by: g dot sokol99 at g-sokol dot info
Reported by: g dot sokol99 at g-sokol dot info
Summary: function 'isset' not found when using array_filter
Status: Open
Type: Bug
Package: *General Issues
Operating System: Linux
PHP Version: 7.1.10
Block user comment: N
Private report: N
New Comment:
- var_export(array_filter($foo, 'isset');
+ var_export(array_filter($foo, 'isset'));
Previous Comments:
------------------------------------------------------------------------
[2017-10-16 15:52:51] g dot sokol99 at g-sokol dot info
Description:
------------
array_filter($some_array, 'isset') cause PHP WARNING.
Test script:
---------------
<?php
$foo = array('a' => 1, 'b' => null);
var_export(array_filter($foo, 'isset');
Expected result:
----------------
array (
'a' => 1,
)
Actual result:
--------------
PHP Warning: array_filter() expects parameter 2 to be a valid callback, function 'isset'
not found or invalid function name in php shell code on line 1
PHP Stack trace:
PHP 1. {main}() php shell code:0
PHP 2. array_filter() php shell code:1
NULL
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75389&edit=1