Bug #74635 [Opn->Dup]: when call a disabled function,php not throw a fatal error
| From: | requinix@php.net | Date: | Tue, 23 May 2017 07:04:12 +0000 |
| Subject: | Bug #74635 [Opn->Dup]: when call a disabled function,php not throw a fatal error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-209230@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74635&edit=1
ID: 74635
Updated by: requinix@php.net
Reported by: shengbin_xu at 163 dot com
Summary: when call a disabled function,php not throw a fatal
error
-Status: Open
+Status: Duplicate
Type: Bug
-Package: PHP Language Specification
+Package: Scripting Engine problem
Operating System: ubuntu
PHP Version: 7.1.5
Block user comment: N
Private report: N
New Comment:
See bug #73921
Previous Comments:
------------------------------------------------------------------------
[2017-05-23 05:03:33] shengbin_xu at 163 dot com
Description:
------------
in php.ini,popen function is in disable functions:
disable_functions => passthru,system,popen,chroot,escapeshellcmd,proc_get_status =>
passthru,system,popen,chroot,escapeshellcmd,proc_get_status
function_exists('popen') return false,but when call popen, php only give a notice,but not
throw a fatal errorã
Test script:
---------------
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
var_dump(function_exists('popen'));//false
$handle = popen("/bin/ls", "r");//null Warning: popen() has been disabled for
security reasons in
var_dump($handle);
echo gettype($handle);
Expected result:
----------------
when popen function is called,php should throw a fatal errorã
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74635&edit=1