PHP-8.2 compat with __toString
authorMichael Wallner <mike@php.net>
Wed, 10 Nov 2021 09:12:57 +0000 (10:12 +0100)
committerMichael Wallner <mike@php.net>
Wed, 10 Nov 2021 09:12:57 +0000 (10:12 +0100)
src/php_pq_misc.c

index 70f32da7bcbfac48dd70612c97e74a86ecf9b29b..9acef342576603ac693610a7224da8d66b6ac0bd 100644 (file)
@@ -138,7 +138,11 @@ ZEND_END_ARG_INFO()
 #define ai_pqdt_jsonserialize ai_pqdt_to_string
 #endif
 
+#if PHP_VERSION_ID >= 80200
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_pqdt_to_string, 0, 0, IS_STRING, 0)
+#else
 ZEND_BEGIN_ARG_INFO_EX(ai_pqdt_to_string, 0, 0, 0)
+#endif
 ZEND_END_ARG_INFO();
 static PHP_METHOD(pqdt, __toString)
 {