php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61697
Patch bug61697.phpt revision 2012-04-12 05:19 UTC by laruence@php.net
Patch bug61697.patch revision 2012-04-12 05:16 UTC by laruence@php.net

Patch bug61697.patch for SPL related Bug #61697

Patch version 2012-04-12 05:16 UTC

Return to Bug #61697 | Download this patch
Patch Revisions:

Developer: laruence@php.net

diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index cd00866..6857ced 100755
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -743,8 +743,17 @@ PHP_FUNCTION(spl_autoload_functions)
 				}
 				add_next_index_string(tmp, alfi->func_ptr->common.function_name, 1);
 				add_next_index_zval(return_value, tmp);
-			} else
-				add_next_index_string(return_value, alfi->func_ptr->common.function_name, 1);
+			} else {
+				if (strncmp(alfi->func_ptr->common.function_name, ZEND_STRL("__lambda_func"))) {
+					add_next_index_string(return_value, alfi->func_ptr->common.function_name, 1);
+				} else {
+				   char *key;
+				   uint len;
+				   long dummy;
+				   zend_hash_get_current_key_ex(SPL_G(autoload_functions), &key, &len, &dummy, 0, &function_pos); 
+				   add_next_index_stringl(return_value, key, len - 1, 1);
+				}
+			}
 
 			zend_hash_move_forward_ex(SPL_G(autoload_functions), &function_pos);
 		}
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 14:02:33 2014 UTC