File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -375,15 +375,27 @@ static void ensure_class_has_interface(zend_class_entry *scope) {
375375 scope -> interface_names = newInterfaceSet ;
376376}
377377
378+ #if PHP_VERSION_ID < 80500
378379static void validate_custom_castable (
379380 zend_attribute * attr , uint32_t target , zend_class_entry * scope )
381+ #else
382+ static zend_string * validate_custom_castable (
383+ zend_attribute * attr , uint32_t target , zend_class_entry * scope )
384+ #endif
380385{
381386 const char * error = require_user_class (scope -> ce_flags );
382387 if (error != NULL ) {
388+ #if PHP_VERSION_ID < 80500
383389 zend_error_noreturn (E_ERROR , error );
390+ #else
391+ return zend_string_init (error , strlen (error ), 0 );
392+ #endif
384393 }
385394 ensure_class_has_interface (scope );
386395 scope -> default_object_handlers = & custom_cast_obj_handlers ;
396+ #if PHP_VERSION_ID >= 80500
397+ return NULL ;
398+ #endif
387399}
388400
389401static void setup_CustomCastable_as_attribute (zend_class_entry * class_entry ) {
You can’t perform that action at this time.
0 commit comments