- Fixed initializing and argument checking for posix_mknod(). (Derick)
- Fixed bug #35197 (Destructor is not called). (Tony)
- Fixed bug #35179 (tokenizer extension needs T_HALT_COMPILER). (Greg)
+- Fixed bug #35176 (include()/require()/*_once() produce wrong error messages
+ about main()). (Dmitry)
- Fixed bug #35142 (SOAP Client/Server Complex Object Support). (Dmitry)
- Fixed bug #35135 (PDOStatment without related PDO object may crash). (Ilia)
- Fixed bug #35091 (SoapClient leaks memory). (Dmitry)
function = "PHP Startup";
} else if (php_during_module_shutdown()) {
function = "PHP Shutdown";
+ } else if (EG(current_execute_data) &&
+ EG(current_execute_data)->opline &&
+ EG(current_execute_data)->opline->opcode == ZEND_INCLUDE_OR_EVAL) {
+ switch (EG(current_execute_data)->opline->op2.u.constant.value.lval) {
+ case ZEND_EVAL:
+ function = "eval";
+ is_function = 1;
+ break;
+ case ZEND_INCLUDE:
+ function = "include";
+ is_function = 1;
+ break;
+ case ZEND_INCLUDE_ONCE:
+ function = "include_once";
+ is_function = 1;
+ break;
+ case ZEND_REQUIRE:
+ function = "require";
+ is_function = 1;
+ break;
+ case ZEND_REQUIRE_ONCE:
+ function = "require_once";
+ is_function = 1;
+ break;
+ default:
+ function = "Unknown";
+ }
} else {
function = get_active_function_name(TSRMLS_C);
if (!function || !strlen(function)) {
--- /dev/null
+--TEST--
+Bug #35176 (include()/require()/*_once() produce wrong error messages about main())
+--INI--
+html_errors=1
+error_reporting=4095
+--FILE--
+<?php
+require_once('nonexisiting.php');
+?>
+--EXPECTF--
+<br />
+<b>Warning</b>: require_once(nonexisiting.php) [<a href='function.require-once.html'>function.require-once.html</a>]: failed to open stream: No such file or directory in <b>%sbug35176.php</b> on line <b>2</b><br />
+<br />
+<b>Fatal error</b>: require_once() [<a href='function.require.html'>function.require.html</a>]: Failed opening required 'nonexisiting.php' (%s) in <b>%sbug35176.php</b> on line <b>2</b><br />