Opencart 3.0.3.2
so this is a wired one and not sure if this will be fixed but not all the time but random when i go to error logs on admincp i get this at the top
Notice: Array to string conversion in /******/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 83Array
http://prntscr.com/pid7xl
and on line 83 is nothing so i screenshot like 50 lines to see if anyone can help - http://prntscr.com/pid8g1
so this is a wired one and not sure if this will be fixed but not all the time but random when i go to error logs on admincp i get this at the top
Notice: Array to string conversion in /******/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 83Array
http://prntscr.com/pid7xl
and on line 83 is nothing so i screenshot like 50 lines to see if anyone can help - http://prntscr.com/pid8g1
Does it show only on the log page or in any page randomly?
XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart
well, that is php doing an eval on a template at line 403.
The "notice" is probably on line 83 of the template content.
So you could dump the template content in environment.php with:
before:
which would give you something like:
then you could see what it is complaining about if you have enough free time on your hands as it could even be that the content of the error log causes this and as such "sometimes" triggers this.
Just remember, this is just a notice, not an error, I would not waste my time with it.
The "notice" is probably on line 83 of the template content.
So you could dump the template content in environment.php with:
Code: Select all
error_log($content);
Code: Select all
eval('?>'.$content);
Code: Select all
[13-Oct-2019 08:25:20 UTC] <?php
/* common/header.twig */
class __TwigTemplate_b85b933bd2162f9f8c8f19f7905f1eb9a5ac5486bd51c87769c817b3e96d4727 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
etc.
Just remember, this is just a notice, not an error, I would not waste my time with it.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
its random might not see it for 1 week then i will see it when on error log but above it and when i refresh it will go and not come back and then random come backopencartmart wrote: ↑Sun Oct 13, 2019 2:21 pmDoes it show only on the log page or in any page randomly?
https://prnt.sc/pid7xl
As it displays in place of success message, it is expected behaviour that it will go away once you refresh browser and will not show again. Look like it will show again if you clear the log i.e after you click the Clear button. If this is the case, you have must have an ocmod (vqmod or whatever you use) that modified success message incorrectly (it must be a string but it's turned into array somehow). Do you have any module related with log? Try disable that
XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart
I have a similar issue, that appears also when using the default theme. The error log says this:
The problem is, I wanted to use an if statement in my template and when I listed all the keys on the frontend, these were the errors:
Code: Select all
2020-09-05 5:12:38 - PHP Notice: Array to string conversion in /home/***/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 30
2020-09-05 5:12:38 - PHP Notice: Array to string conversion in /home/***/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 30
2020-09-05 5:12:38 - PHP Notice: Array to string conversion in /home/***/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 30
2020-09-05 5:12:38 - PHP Unknown: Object of class Request could not be converted to string in /home/***/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 30
2020-09-05 5:12:38 - PHP Unknown: Object of class Cart\Customer could not be converted to string in /home/***/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 30
2020-09-05 5:12:38 - PHP Unknown: Object of class Cart\Cart could not be converted to string in /home/***/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 30
Code: Select all
document_links - Notice: Array to string conversion in /home/***/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 61Array
document_styles - Notice: Array to string conversion in /home/***/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 61Array
document_scripts - Notice: Array to string conversion in /home/***/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 61Array
route - Unknown: Object of class Request could not be converted to string in /home/***/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 61
customer - Unknown: Object of class Cart\Customer could not be converted to string in /home/***/public_html/system/library/template/Twig/Environment.php(403) : eval()'d code on line 61
Who is online
Users browsing this forum: Semrush [Bot] and 324 guests