Issuing Gift Certificates from returns for store credit PHP Deprecation Notice

CS-Cart Store Builder 4.21.2
PHP 8.3.36

When creating a Gift Certificate from RMA, these 2 PHP Deprecation Notices are thrown in the Debugger and written to the PHP error log:

PHP Deprecated: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in /app/addons/gift_certificates/controllers/backend/rma.post.php on line 40
PHP Deprecated: Automatic conversion of false to array is deprecated in /app/addons/gift_certificates/controllers/backend/rma.post.php on line 43

Hello

Fix: replace line 40 in app/addons/gift_certificates/controllers/backend/rma.post.php with the same guard core already uses in app/addons/rma/controllers/common/rma.post.php:

$return_info[‘extra’] = !empty($return_info[‘extra’]) ? unserialize($return_info[‘extra’]) : array(); if (!is_array($return_info[‘extra’])) {
$return_info[‘extra’] = array();
}

It’s a core file, so an upgrade can overwrite it.

Best regards
Robert