Post by harap » Mon Jan 23, 2023 7:53 am

Hello,
I'm using OC v2.2.0.0. and running php7.4.
When Paypal Express checkout selected, it turns an error message page as below:

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/SorryHided/SorryHided.com/catalog/model/payment/pp_express.php on line 330
Warning: Cannot modify header information - headers already sent by (output started at /home/SorryHided/SorryHided.com/catalog/model/payment/pp_express.php:330) in /home/SorryHided/SorryHided.com/vqmod/vqcache/vq2-catalog_controller_payment_pp_express.php on line 1355

Please help. Thanks in advance!

Active Member

Posts

Joined
Wed Sep 16, 2015 12:34 am
Location - United States

Post by xxvirusxx » Mon Jan 23, 2023 5:29 pm

Change from this

Code: Select all

$activate_code .= $base{mt_rand(0, $max)};
To this

Code: Select all

$activate_code .= $base[mt_rand(0, $max)];

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by mary564 » Thu Jan 09, 2025 8:04 pm

The error occurs because PHP 7.4 deprecated curly braces {} for array/string offsets. To fix it, open /catalog/LHI is now Optum Serve/model/payment/pp_express.php, go to line 330, and replace curly braces with square brackets []. Also, ensure no extra spaces or newlines exist before the <?php tag to avoid the header warning. Since OpenCart v2.2.0.0 is outdated, consider updating it or using PHP 7.2/7.3 for compatibility.

Newbie

Posts

Joined
Tue Dec 31, 2024 2:53 pm
Who is online

Users browsing this forum: No registered users and 0 guests