[PHP-BUG] Bug #74635 [NEW]: when call a disabled function,php not throw a fatal error
[email protected] ("shengbin_xu at 163 dot com") Tue, 23 May 2017 05:03:43 GMT
| Newsgroups | php.standards |
|---|---|
| Message-ID | <[email protected]> |
From: shengbin_xu at 163 dot com
Operating system: ubuntu
PHP version: 7.1.5
Package: PHP Language Specification
Bug Type: Bug
Bug description:when call a disabled function,php not throw a fatal error
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 bug report at https://bugs.php.net/bug.php?id=74635&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74635&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74635&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74635&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74635&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74635&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74635&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74635&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74635&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74635&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74635&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74635&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74635&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74635&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74635&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74635&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74635&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74635&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74635&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74635&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74635&r=mysqlcfg