File tree 3 files changed +30
-0
lines changed
3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1
1
PHP NEWS
2
2
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3
3
?? ??? ????, PHP 7.3.3
4
+ -Core:
5
+ . Fixed bug #77494 (Disabling class causes segfault on member access).
6
+ (Dmitry)
4
7
5
8
- Opcache:
6
9
. Fixed bug #77287 (Opcache literal compaction is incompatible with EXT
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #77494 (Disabling class causes segfault on member access)
3
+ --SKIPIF--
4
+ <?php if (!extension_loaded ("curl " )) exit ("skip curl extension not loaded " ); ?>
5
+ --INI--
6
+ disable_classes=CURLFile
7
+ --FILE--
8
+ <?php
9
+ $ a = new CURLFile ();
10
+ var_dump ($ a ->name );
11
+ ?>
12
+ --EXPECTF--
13
+ Warning: CURLFile() has been disabled for security reasons in %sbug77494.php on line 2
14
+
15
+ Notice: Undefined property: CURLFile::$name in %sbug77494.php on line 3
16
+ NULL
Original file line number Diff line number Diff line change @@ -2861,6 +2861,17 @@ static zend_object *display_disabled_class(zend_class_entry *class_type) /* {{{
2861
2861
zend_object * intern ;
2862
2862
2863
2863
intern = zend_objects_new (class_type );
2864
+
2865
+ /* Initialize default properties */
2866
+ if (EXPECTED (class_type -> default_properties_count != 0 )) {
2867
+ zval * p = intern -> properties_table ;
2868
+ zval * end = p + class_type -> default_properties_count ;
2869
+ do {
2870
+ ZVAL_UNDEF (p );
2871
+ p ++ ;
2872
+ } while (p != end );
2873
+ }
2874
+
2864
2875
zend_error (E_WARNING , "%s() has been disabled for security reasons" , ZSTR_VAL (class_type -> name ));
2865
2876
return intern ;
2866
2877
}
You can’t perform that action at this time.
0 commit comments