Skip to content

Commit 2e1243d

Browse files
committed
fix tests
1 parent a9dacc3 commit 2e1243d

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

Zend/tests/errmsg/errmsg_027.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ class test {
1313
echo "Done\n";
1414
?>
1515
--EXPECTF--
16-
Fatal error: Class declarations may not be nested in %s on line %d
16+
Fatal error: Class declarations may not be declared inside functions in %s on line %d

Zend/zend_compile.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9239,6 +9239,8 @@ static void zend_compile_class_decl(znode *result, zend_ast *ast, bool toplevel)
92399239
/* Find an anon class name that is not in use yet. */
92409240
name = NULL;
92419241
lcname = NULL;
9242+
ce->required_scope = NULL;
9243+
ce->lexical_scope = NULL;
92429244
do {
92439245
zend_tmp_string_release(name);
92449246
zend_tmp_string_release(lcname);

ext/reflection/tests/ReflectionClass_toString_001.phpt

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Class [ <internal:Reflection> class ReflectionClass implements Stringable, Refle
3030
Property [ public string $name ]
3131
}
3232

33-
- Methods [64] {
33+
- Methods [68] {
3434
Method [ <internal:Reflection> private method __clone ] {
3535

3636
- Parameters [0] {
@@ -514,5 +514,33 @@ Class [ <internal:Reflection> class ReflectionClass implements Stringable, Refle
514514
}
515515
- Return [ array ]
516516
}
517+
518+
Method [ <internal:Reflection> public method isInnerClass ] {
519+
520+
- Parameters [0] {
521+
}
522+
- Return [ bool ]
523+
}
524+
525+
Method [ <internal:Reflection> public method isPrivate ] {
526+
527+
- Parameters [0] {
528+
}
529+
- Return [ bool ]
530+
}
531+
532+
Method [ <internal:Reflection> public method isProtected ] {
533+
534+
- Parameters [0] {
535+
}
536+
- Return [ bool ]
537+
}
538+
539+
Method [ <internal:Reflection> public method isPublic ] {
540+
541+
- Parameters [0] {
542+
}
543+
- Return [ bool ]
544+
}
517545
}
518546
}

0 commit comments

Comments
 (0)