Post by planetnet1 » Sat Jun 19, 2021 9:27 am

PHP 7.2. am getting the following error on 3 lines of code:
( PHP Deprecated: Function create_function() is deprecated in )
I'm not sure how to fix it, please help me, thanks!

Code: Select all

    $skin = preg_replace_callback('/{\$lng->(.+?)}/i', create_function('$matches', 'global $LNG; return $LNG[$matches[1]];'), $skin);
    $skin = preg_replace_callback('/{\$(.+?)}/i', create_function('$matches', 'global $TMPL; return $TMPL[$matches[1]];'), $skin);
    $skin = preg_replace_callback('/{include \"(.+?)\"}/i', create_function('$matches', 'return file_get_contents($matches[1]);'), $skin);

Newbie

Posts

Joined
Sat Jun 19, 2021 9:18 am

Post by OSWorX » Sat Jun 19, 2021 3:03 pm

Don't know from where you have this code piece?!
Not from OpenCart, that's clear.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by khnaz35 » Sat Jun 19, 2021 3:38 pm

Seems Journal code.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by straightlight » Sat Jun 19, 2021 5:38 pm

OC version. Unsupported request. Contact the extension developer to resolve this issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by planetnet1 » Sun Jun 20, 2021 5:47 am

good evening is from a page I am designing I just wanted a help here my piece got a php error

Newbie

Posts

Joined
Sat Jun 19, 2021 9:18 am

Post by straightlight » Sun Jun 20, 2021 9:28 am

planetnet1 wrote:
Sun Jun 20, 2021 5:47 am
good evening is from a page I am designing I just wanted a help here my piece got a php error
You could always create a new service request in the Commercial Support section of the forum to have this issue fixed as a custom job.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ADD Creative » Sun Jun 20, 2021 8:20 pm

planetnet1 wrote:
Sun Jun 20, 2021 5:47 am
good evening is from a page I am designing I just wanted a help here my piece got a php error
Have a good read of the following pages.
https://www.php.net/manual/en/function. ... nction.php
https://www.php.net/manual/en/functions.anonymous.php

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Mon Jun 21, 2021 7:48 pm

planetnet1 wrote:
Sun Jun 20, 2021 5:47 am
good evening is from a page I am designing I just wanted a help here my piece got a php error
The message tells you everything you need to know.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 93 guests