File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -816,6 +816,7 @@ int zend_startup(zend_utility_functions *utility_functions) /* {{{ */
816
816
817
817
zend_startup_strtod ();
818
818
zend_startup_extensions_mechanism ();
819
+ zend_startup_error_notify_callbacks ();
819
820
820
821
/* Set up utility functions and values */
821
822
zend_error_cb = utility_functions -> error_function ;
@@ -1078,6 +1079,7 @@ void zend_shutdown(void) /* {{{ */
1078
1079
zend_hash_destroy (GLOBAL_AUTO_GLOBALS_TABLE );
1079
1080
free (GLOBAL_AUTO_GLOBALS_TABLE );
1080
1081
1082
+ zend_shutdown_error_notify_callbacks ();
1081
1083
zend_shutdown_extensions ();
1082
1084
free (zend_version_info );
1083
1085
@@ -1784,6 +1786,7 @@ int zend_shutdown_error_notify_callbacks()
1784
1786
void zend_register_error_notify_callback (const char * name , zend_error_notify_cb cb )
1785
1787
{
1786
1788
zend_error_notify_callback callback ;
1789
+
1787
1790
callback .name = name ;
1788
1791
callback .notify_callback = cb ;
1789
1792
Original file line number Diff line number Diff line change @@ -86,6 +86,28 @@ static zend_always_inline int php_info_print(const char *str) /* {{{ */
86
86
}
87
87
/* }}} */
88
88
89
+ static ZEND_COLD void php_info_print_error_notify_callback (zend_error_notify_callback * callback ) /* {{{ */
90
+ {
91
+ php_info_printf ("%s " , callback -> name );
92
+ }
93
+ /* }}} */
94
+
95
+ static ZEND_COLD void php_info_print_error_notify_callbacks () /* {{{ */
96
+ {
97
+ if (!sapi_module .phpinfo_as_text ) {
98
+ php_info_printf ("<tr><td class=\"e\">Registered Error Notification Callbacks</td><td class=\"v\">" );
99
+ } else {
100
+ php_info_printf ("\nRegistered Error Notification Callbacks => " );
101
+ }
102
+
103
+ zend_llist_apply (& zend_error_notify_callbacks , (llist_apply_func_t ) php_info_print_error_notify_callback );
104
+
105
+ if (!sapi_module .phpinfo_as_text ) {
106
+ php_info_print ("</td></tr>\n" );
107
+ }
108
+ }
109
+ /* }}} */
110
+
89
111
static ZEND_COLD void php_info_print_stream_hash (const char * name , HashTable * ht ) /* {{{ */
90
112
{
91
113
zend_string * key ;
@@ -884,6 +906,8 @@ PHPAPI ZEND_COLD void php_print_info(int flag)
884
906
php_info_print_stream_hash ("Stream Socket Transports" , php_stream_xport_get_hash ());
885
907
php_info_print_stream_hash ("Stream Filters" , php_get_stream_filters_hash ());
886
908
909
+ php_info_print_error_notify_callbacks ();
910
+
887
911
php_info_print_table_end ();
888
912
889
913
/* Zend Engine */
You can’t perform that action at this time.
0 commit comments