You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Zend/tests/bug69084.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,4 +26,4 @@ $b->main();
26
26
27
27
?>
28
28
--EXPECTF--
29
-
Fatal error: Class Bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Bar::doOtherStuff) in %s on line %d
29
+
Fatal error: Class Bar contains 1 abstract method and must therefore be declared abstract or implement the remaining method (Bar::doOtherStuff) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/errmsg_018.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,4 +10,4 @@ class test {
10
10
echo"Done\n";
11
11
?>
12
12
--EXPECTF--
13
-
Fatal error: Class test contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (test::foo) in %s on line %d
13
+
Fatal error: Class test contains 1 abstract method and must therefore be declared abstract or implement the remaining method (test::foo) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/property_hooks/abstract_get_set_readonly.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,4 +10,4 @@ class C extends P {
10
10
}
11
11
?>
12
12
--EXPECTF--
13
-
Fatal error: Class C contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (P::$prop::set) in %s on line %d
13
+
Fatal error: Class C contains 1 abstract method and must therefore be declared abstract or implement the remaining method (P::$prop::set) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/property_hooks/abstract_hook_in_non_abstract_class.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,4 +12,4 @@ class Test {
12
12
13
13
?>
14
14
--EXPECTF--
15
-
Fatal error: Class Test contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Test::$prop::get) in %s on line %d
15
+
Fatal error: Class Test contains 1 abstract method and must therefore be declared abstract or implement the remaining method (Test::$prop::get) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/property_hooks/abstract_hook_not_implemented.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,4 +14,4 @@ class B extends A {}
14
14
15
15
?>
16
16
--EXPECTF--
17
-
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (A::$prop::get) in %s on line %d
17
+
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining method (A::$prop::get) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/property_hooks/invalid_abstract_indirect.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,4 +13,4 @@ class B extends A {
13
13
14
14
?>
15
15
--EXPECTF--
16
-
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (A::$prop::get) in %s on line %d
16
+
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining method (A::$prop::get) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/property_hooks/invalid_abstract_indirect_2.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,4 +12,4 @@ class B extends A {
12
12
13
13
?>
14
14
--EXPECTF--
15
-
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (A::$prop::get) in %s on line %d
15
+
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining method (A::$prop::get) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/traits/interface_002.phpt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,4 +21,4 @@ new bar;
21
21
22
22
?>
23
23
--EXPECTF--
24
-
Fatal error: Class bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (baz::abc) in %s on line %d
24
+
Fatal error: Class bar contains 1 abstract method and must therefore be declared abstract or implement the remaining method (baz::abc) in %s on line %d
? "%s %s contains %d abstract method%s and must therefore be declared abstract or implement the remaining methods ("MAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMT")"
3014
-
: "%s %s must implement %d abstract private method%s ("MAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMT")",
3015
-
zend_get_object_type_uc(ce),
3016
-
ZSTR_VAL(ce->name), ai.cnt,
3017
-
ai.cnt>1 ? "s" : "",
3018
-
DISPLAY_ABSTRACT_FN(0),
3019
-
DISPLAY_ABSTRACT_FN(1),
3020
-
DISPLAY_ABSTRACT_FN(2)
3012
+
if (!is_explicit_abstract&&can_be_abstract) {
3013
+
zend_error_noreturn(E_ERROR,
3014
+
"%s %s contains %d abstract method%s and must therefore be declared abstract or implement the remaining method%s ("MAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMT")",
3015
+
zend_get_object_type_uc(ce),
3016
+
ZSTR_VAL(ce->name), ai.cnt,
3017
+
ai.cnt>1 ? "s" : "",
3018
+
ai.cnt>1 ? "s" : "",
3019
+
DISPLAY_ABSTRACT_FN(0),
3020
+
DISPLAY_ABSTRACT_FN(1),
3021
+
DISPLAY_ABSTRACT_FN(2)
3022
+
);
3023
+
} else {
3024
+
zend_error_noreturn(E_ERROR,
3025
+
"%s %s must implement %d abstract private method%s ("MAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMT")",
3026
+
zend_get_object_type_uc(ce),
3027
+
ZSTR_VAL(ce->name), ai.cnt,
3028
+
ai.cnt>1 ? "s" : "",
3029
+
DISPLAY_ABSTRACT_FN(0),
3030
+
DISPLAY_ABSTRACT_FN(1),
3031
+
DISPLAY_ABSTRACT_FN(2)
3021
3032
);
3033
+
}
3022
3034
} else {
3023
3035
/* now everything should be fine and an added ZEND_ACC_IMPLICIT_ABSTRACT_CLASS should be removed */
0 commit comments