@@ -1725,11 +1725,10 @@ ZEND_API ZEND_COLD void zend_wrong_string_offset_error(void)
1725
1725
1726
1726
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_deprecated_function (const zend_function * fbc )
1727
1727
{
1728
- zend_attribute * deprecated ;
1729
1728
zend_string * message_suffix = zend_empty_string ;
1730
1729
1731
1730
if (fbc -> common .attributes != NULL ) {
1732
- deprecated = zend_get_attribute_str (fbc -> common .attributes , "deprecated" , sizeof ("deprecated" )- 1 );
1731
+ zend_attribute * deprecated = zend_get_attribute_str (fbc -> common .attributes , "deprecated" , sizeof ("deprecated" )- 1 );
1733
1732
1734
1733
if (deprecated -> argc >= 1 ) {
1735
1734
zval message ;
@@ -1742,31 +1741,22 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_deprecated_function(const zend_functi
1742
1741
1743
1742
int code = fbc -> type == ZEND_INTERNAL_FUNCTION ? E_DEPRECATED : E_USER_DEPRECATED ;
1744
1743
1745
- if (ZSTR_LEN (message_suffix ) > 0 ) {
1746
- if (fbc -> common .scope ) {
1747
- zend_error_unchecked (code , "Method %s::%s() is deprecated, %S" ,
1748
- ZSTR_VAL (fbc -> common .scope -> name ),
1749
- ZSTR_VAL (fbc -> common .function_name ),
1750
- message_suffix
1751
- );
1752
- } else {
1753
- zend_error_unchecked (code , "Function %s() is deprecated, %S" ,
1754
- ZSTR_VAL (fbc -> common .function_name ),
1755
- message_suffix
1756
- );
1757
- }
1758
-
1759
- zend_string_release (message_suffix );
1744
+ if (fbc -> common .scope ) {
1745
+ zend_error_unchecked (code , "Method %s::%s() is deprecated%s%S" ,
1746
+ ZSTR_VAL (fbc -> common .scope -> name ),
1747
+ ZSTR_VAL (fbc -> common .function_name ),
1748
+ ZSTR_LEN (message_suffix ) > 0 ? ", " : "" ,
1749
+ message_suffix
1750
+ );
1760
1751
} else {
1761
- if (fbc -> common .scope ) {
1762
- zend_error (code , "Method %s::%s() is deprecated" ,
1763
- ZSTR_VAL (fbc -> common .scope -> name ),
1764
- ZSTR_VAL (fbc -> common .function_name )
1765
- );
1766
- } else {
1767
- zend_error (code , "Function %s() is deprecated" , ZSTR_VAL (fbc -> common .function_name ));
1768
- }
1752
+ zend_error_unchecked (code , "Function %s() is deprecated%s%S" ,
1753
+ ZSTR_VAL (fbc -> common .function_name ),
1754
+ ZSTR_LEN (message_suffix ) > 0 ? ", " : "" ,
1755
+ message_suffix
1756
+ );
1769
1757
}
1758
+
1759
+ zend_string_release (message_suffix );
1770
1760
}
1771
1761
1772
1762
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_false_to_array_deprecated (void )
0 commit comments