]> granicus.if.org Git - php/commitdiff
Fixed inherited functions from unspecified files being included in phpdbg_get_executa...
authorBob Weinand <bobwei9@hotmail.com>
Thu, 11 Feb 2016 05:42:51 +0000 (06:42 +0100)
committerBob Weinand <bobwei9@hotmail.com>
Thu, 11 Feb 2016 05:42:51 +0000 (06:42 +0100)
See also https://github.com/krakjoe/phpdbg/issues/152

NEWS
sapi/phpdbg/phpdbg.c

diff --git a/NEWS b/NEWS
index d15eb75458eb3629e75baf7d7395a2e6f5fe8812..4e00285960b1f959d5173c04f09ee3b62fa239ae 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,10 @@ PHP                                                                        NEWS
   . Fixed bug #62172 (FPM not working with Apache httpd 2.4 balancer/fcgi
     setup). (Matt Haught, Remi)
 
+- phpdbg:
+  . Fixed inherited functions from unspecified files being included in
+    phpdbg_get_executable(). (Bob)
+
 - Standard:
   . Fixed bug #70720 (strip_tags improper php code parsing). (Julien)
 
index 8acf061983128f8bdb481e2942ce17d01b76bdc0..bf68e301fdd923acaf7b3673539d74e3cd8ae3a7 100644 (file)
@@ -554,7 +554,7 @@ static PHP_FUNCTION(phpdbg_get_executable)
                if (ce->type == ZEND_USER_CLASS) {
                        if (zend_hash_exists(files, ce->info.user.filename)) {
                                ZEND_HASH_FOREACH_PTR(&ce->function_table, func) {
-                                       if (func->type == ZEND_USER_FUNCTION) {
+                                       if (func->type == ZEND_USER_FUNCTION && zend_hash_exists(files, func->op_array.filename)) {
                                                insert_ht = phpdbg_add_empty_array(Z_ARR_P(return_value), func->op_array.filename);
 
                                                if (by_function) {