File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,15 @@ static int php_phongo_int64_compare_objects(zval* o1, zval* o2)
345
345
return 0 ;
346
346
}
347
347
348
+ #if PHP_VERSION_ID < 80000
349
+ static int php_phongo_int64_compare_zvals (zval * result , zval * op1 , zval * op2 )
350
+ {
351
+ ZVAL_LONG (result , php_phongo_int64_compare_objects (op1 , op2 ));
352
+
353
+ return SUCCESS ;
354
+ }
355
+ #endif
356
+
348
357
static zend_result php_phongo_int64_cast_object (phongo_compat_object_handler_type * readobj , zval * retval , int type )
349
358
{
350
359
php_phongo_int64_t * intern ;
@@ -627,6 +636,12 @@ void php_phongo_int64_init_ce(INIT_FUNC_ARGS)
627
636
php_phongo_handler_int64 .offset = XtOffsetOf (php_phongo_int64_t , std );
628
637
php_phongo_handler_int64 .cast_object = php_phongo_int64_cast_object ;
629
638
php_phongo_handler_int64 .do_operation = php_phongo_int64_do_operation ;
639
+
640
+ /* On PHP 7.4, compare_objects is only used when comparing two objects.
641
+ * Use the compare handler to compare an object with any other zval */
642
+ #if PHP_VERSION_ID < 80000
643
+ php_phongo_handler_int64 .compare = php_phongo_int64_compare_zvals ;
644
+ #endif
630
645
}
631
646
632
647
bool phongo_int64_new (zval * object , int64_t integer )
You can’t perform that action at this time.
0 commit comments