Error Code In The Header Of My Store Homepage


I hope you will help me with this issue.

I found out that the browser window shows HTML code instead of the page title. In view page source, I found the following code located in the page header section within the title tag:

PHP Warning


array_reverse() expects parameter 1 to be array, null given

Error at

app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code, line: 56


File: app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code
Line: 56
Function: {closure}
File: app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php
Line: 188
Function: content_5ba274479f0b52_18898835
File: app/Tygh/SmartyEngine/Core.php
Line: 76
Function: fetch
File: app/functions/fn.control.php
Line: 618
Function: fetch
File: index.php
Line: 25
Function: fn_dispatch
Online Shopping Website.

After pasting the above code in an html file, I see this message:

I did the following to get rid of this error with no luck:

  • Disabled all third party addons.
  • Switched back to default CS-Cart themes.
  • Deleted cache folder in /var/
  • Recreated new layout.

Anyone has experienced like this issue?

Note: This error shows only when I open the store in my language (Arabic). English language is fine.

What is the possiblity that it is a bug in CS-Cart even though I couldn't reproduce the error in

Thank you in advance!


Do you have many of these addon from other companies ?

I would try to execute the command

cd /design/themes/responsive/templates/addons
grep -r "array_reverse" ./

Best regards


Thank you for your suggestion.

I executed the command but found nothing. I use just 4 addons from thirdparties.

Also, I tried after disabling the addons. Still get this error.


How do I understand using the responsive theme? Do you have any other installed?
If so, execute the grep command in the graphical theme you are using.
Best regards

The command returns no results. I don't know if I am performing it the right way.

As I mentioned earlier, I have switched back to default responsive theme and disabled all addons. Do I still need to search for array_reverse in my custom theme?


Do you have access to ssh on the server where is the store?

Best regards


Yes, I performed the grep command using ssh after navigating to the correct theme directory. My store is on CentOS7 on VPS.

The error message only on the homepage. Other pages are fine.

Try to disable blocks on home page layout one by one

I did disable all blocks. The homepage now is totally blank with no single letter. Still, the below rubbish shows in the window browser as a title.!

			</span><div style="margin: 0 0 30px 0; font-size: 1em; padding: 0 10px;"> <h2>PHP Warning</h2> <h3>Message</h3> <p style="margin: 0; padding: 0 0 20px 0;">array_reverse() expects parameter 1 to be array, null given</p> <h3>Error at</h3> <p style="margin: 0; padding: 0 0 20px 0;">var/cache/templates/responsive/40c4a62d1405e59112ce025f5a5c3c9289dd410a.tygh.index.tpl.php, line: 56</p> <h3>Backtrace</h3> <table cellspacing="0" cellpadding="3" style="font-size: 0.9em;"><tr bgcolor='#EEEEEE'><td>File:</td><td>var/cache/templates/responsive/40c4a62d1405e59112ce025f5a5c3c9289dd410a.tygh.index.tpl.php</td></tr> <tr bgcolor='#EEEEEE'><td>Line:</td><td>56</td></tr> <tr bgcolor='#EEEEEE'><td>Function:</td><td><b>{closure}</b></td></tr> <tr bgcolor='#CCCCCC'><td>File:</td><td>app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php</td></tr> <tr bgcolor='#CCCCCC'><td>Line:</td><td>188</td></tr> <tr bgcolor='#CCCCCC'><td>Function:</td><td><b>content_5ba287d2958df5_12370799</b></td></tr> <tr bgcolor='#EEEEEE'><td>File:</td><td>app/Tygh/SmartyEngine/Core.php</td></tr> <tr bgcolor='#EEEEEE'><td>Line:</td><td>76</td></tr> <tr bgcolor='#EEEEEE'><td>Function:</td><td><b>fetch</b></td></tr> <tr bgcolor='#CCCCCC'><td>File:</td><td>app/functions/fn.control.php</td></tr> <tr bgcolor='#CCCCCC'><td>Line:</td><td>618</td></tr> <tr bgcolor='#CCCCCC'><td>Function:</td><td><b>fetch</b></td></tr> <tr bgcolor='#EEEEEE'><td>File:</td><td>index.php</td></tr> <tr bgcolor='#EEEEEE'><td>Line:</td><td>25</td></tr> <tr bgcolor='#EEEEEE'><td>Function:</td><td><b>fn_dispatch</b></td></tr> </table></div> Shopping Cart Software & Ecommerce Software Solutions by CS-Cart<span>

Deleted cache folder and did clear cache in the admin panel, with no luck!


Is the same error on other pages too? e.g.


or on page categories ?

Please try disable block (step by step) in "Default" in Layout

Best regards


Please check if array_reverse function is called here