From d522ab66810ca3b4605c2c5e8c7ab1e239ee2e8b Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 6 Sep 2023 13:39:26 -0700 Subject: [PATCH 1/6] Amfphp_Core_Exception: fix Creation of dynamic property Amfphp_Core_Exception:: is deprecated --- Amfphp/Core/Exception.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Amfphp/Core/Exception.php b/Amfphp/Core/Exception.php index 5eb8a00b..b696e12a 100755 --- a/Amfphp/Core/Exception.php +++ b/Amfphp/Core/Exception.php @@ -14,6 +14,7 @@ * @package Amfphp_Core * @author Ariel Sommeria-klein */ +#[AllowDynamicProperties] class Amfphp_Core_Exception extends Exception { } From 47435b15e32a1a75f3f8ee47b6081a1efc95f831 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 6 Sep 2023 13:40:23 -0700 Subject: [PATCH 2/6] AmfphpErrorHandler: fix Too few arguments to function custom_warning_handler(), 4 passed and exactly 5 expected --- Amfphp/Plugins/AmfphpErrorHandler/AmfphpErrorHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Amfphp/Plugins/AmfphpErrorHandler/AmfphpErrorHandler.php b/Amfphp/Plugins/AmfphpErrorHandler/AmfphpErrorHandler.php index 7d88a994..a7ddeddd 100644 --- a/Amfphp/Plugins/AmfphpErrorHandler/AmfphpErrorHandler.php +++ b/Amfphp/Plugins/AmfphpErrorHandler/AmfphpErrorHandler.php @@ -36,7 +36,7 @@ public function __construct(array $config = null) { * @param mixed $errcontext * @throws Exception */ -function custom_warning_handler($errno, $errstr, $errfile, $errline, $errcontext) { +function custom_warning_handler($errno, $errstr, $errfile = null, $errline = null, $errcontext = null) { if ($errno & error_reporting()) { throw new Amfphp_Core_Exception("$errstr . \n
file: $errfile \n
line: $errline \n
context: " . print_r($errcontext, true), $errno); } From b4a0400d2ff01ba53b0586e977de6af549c0fd93 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 6 Sep 2023 13:41:58 -0700 Subject: [PATCH 3/6] AmfphpGet, AmfphpJson: Fix strpos(): Passing null to parameter #1 () of type string is deprecated --- Amfphp/Plugins/AmfphpGet/AmfphpGet.php | 2 +- Amfphp/Plugins/AmfphpJson/AmfphpJson.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Amfphp/Plugins/AmfphpGet/AmfphpGet.php b/Amfphp/Plugins/AmfphpGet/AmfphpGet.php index 5d78cb2d..a0cddc4a 100644 --- a/Amfphp/Plugins/AmfphpGet/AmfphpGet.php +++ b/Amfphp/Plugins/AmfphpGet/AmfphpGet.php @@ -70,7 +70,7 @@ public function __construct(array $config = null) { * @return this or null */ public function filterHandler($handler, $contentType){ - if(strpos($contentType, self::CONTENT_TYPE) !== false){ + if(!is_null($contentType) && strpos($contentType, self::CONTENT_TYPE) !== false){ return $this; } } diff --git a/Amfphp/Plugins/AmfphpJson/AmfphpJson.php b/Amfphp/Plugins/AmfphpJson/AmfphpJson.php index 987a4eca..6beadfe6 100644 --- a/Amfphp/Plugins/AmfphpJson/AmfphpJson.php +++ b/Amfphp/Plugins/AmfphpJson/AmfphpJson.php @@ -63,7 +63,7 @@ public function __construct(array $config = null) { * @return this or null */ public function filterHandler($handler, $contentType) { - if (strpos($contentType, self::JSON_CONTENT_TYPE) !== false) { + if (!is_null($contentType) && strpos($contentType, self::JSON_CONTENT_TYPE) !== false) { return $this; } } From 210d66659781b4493f6c80f7460b5c3a50e0bfd8 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 6 Sep 2023 13:42:38 -0700 Subject: [PATCH 4/6] AmfphpMonitor: check for null before calling substr() --- Amfphp/Plugins/AmfphpMonitor/AmfphpMonitor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Amfphp/Plugins/AmfphpMonitor/AmfphpMonitor.php b/Amfphp/Plugins/AmfphpMonitor/AmfphpMonitor.php index d63171ef..7213b3e0 100644 --- a/Amfphp/Plugins/AmfphpMonitor/AmfphpMonitor.php +++ b/Amfphp/Plugins/AmfphpMonitor/AmfphpMonitor.php @@ -206,7 +206,7 @@ public function filterDeserializedResponse($deserializedResponse) { * @param mixed $rawData */ public function filterSerializedResponse($rawData) { - if(substr($this->uri, 0, 6) == 'Amfphp'){ + if(!is_null($this->uri) && substr($this->uri, 0, 6) == 'Amfphp'){ return; } From b592d54f2dbc33b4f7d90bf8f82610814e9b74a5 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 6 Sep 2023 14:22:14 -0700 Subject: [PATCH 5/6] AcknowledgeMessage, ErrorMessage: fix Creation of dynamic property is deprecated --- Amfphp/Plugins/AmfphpFlexMessaging/AcknowledgeMessage.php | 2 ++ Amfphp/Plugins/AmfphpFlexMessaging/ErrorMessage.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Amfphp/Plugins/AmfphpFlexMessaging/AcknowledgeMessage.php b/Amfphp/Plugins/AmfphpFlexMessaging/AcknowledgeMessage.php index f7e7389d..54647ab9 100644 --- a/Amfphp/Plugins/AmfphpFlexMessaging/AcknowledgeMessage.php +++ b/Amfphp/Plugins/AmfphpFlexMessaging/AcknowledgeMessage.php @@ -68,6 +68,8 @@ class AmfphpFlexMessaging_AcknowledgeMessage { */ public $headers; + public $_explicitType; + /** * constructor * @param string $correlationId diff --git a/Amfphp/Plugins/AmfphpFlexMessaging/ErrorMessage.php b/Amfphp/Plugins/AmfphpFlexMessaging/ErrorMessage.php index b8f8a29e..6247e2a2 100644 --- a/Amfphp/Plugins/AmfphpFlexMessaging/ErrorMessage.php +++ b/Amfphp/Plugins/AmfphpFlexMessaging/ErrorMessage.php @@ -48,6 +48,8 @@ class AmfphpFlexMessaging_ErrorMessage { */ public $rootCause; + public $_explicitType; + /** * constructor * @param type $correlationId From d6a3e08884e4b29cc12d6243480ae35b81140c75 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 6 Sep 2023 14:23:02 -0700 Subject: [PATCH 6/6] UserVO1 example: Fix Creation of dynamic property is deprecated --- Examples/Php/Vo/UserVo1.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Examples/Php/Vo/UserVo1.php b/Examples/Php/Vo/UserVo1.php index e1538b5c..1eb7c0dd 100644 --- a/Examples/Php/Vo/UserVo1.php +++ b/Examples/Php/Vo/UserVo1.php @@ -15,6 +15,7 @@ * @package Amfphp_Examples_ExampleService * @author Ariel Sommeria-klein */ +#[AllowDynamicProperties] class UserVo1 { /** *name