Fatal Error on Global Options

I just installed a clean version of 2.1.1 and went to create a Global Option. It allows me to add 28 variants, but on the 29th when I save it says:



Fatal error: Cannot use string offset as an array in /home/host/public_html/store/var/compiled/admin/%%E4^E42^E4252AD1%%mainbox.tpl.php on line 58



I cleared all my temp files in var/cache and in var/compiled. I even changed the memory limit in the config-local.php to 96m.



Any ideas?

Im having the same issue.



Any help guys? do any one know why this error when tryiong to add options on global options?

Next time it occurs, post the few lines surrounding the error (within code tags please). In this case like 55 -60 from the compiled mainbox.tpl.php file.



This will give us at least a pointer to where to possibly look.

Welll now its happening while editing the global options for my products.



Error:



Fatal error: Cannot use string offset as an array in /home/nbentode/public_html/var/compiled/admin/%%E4^E42^E4252AD1%%mainbox.tpl.php on line 58





The lines you requested (50 to 60)

```php _tpl_vars['title_extra']): ?>

-


_tpl_vars['title_extra']; ?>




_tpl_vars['title_extra'] || $this->_tpl_vars['tools'] || $this->_tpl_vars['navigation']['dynamic']['actions'] || $this->_tpl_vars['select_languages'] || $this->_tpl_vars['extra_tools']): ?>



_tpl_vars['navigation']['dynamic']['actions'] || $this->_tpl_vars['select_languages'] || $this->_tpl_vars['extra_tools']): ?>


_tpl_vars['select_languages'] && sizeof($this->_tpl_vars['languages']) > 1): ?> ```

Line 58 is:
```php _tpl_vars['navigation']['dynamic']['actions'] || $this->_tpl_vars['select_languages'] || $this->_tpl_vars['extra_tools']): ?>
```

I’ve seen this before during development… You have a controller somewhere that is not doing a

return array(CONTROLLER_STATUS_OK);

or

return array(CONTROLLER_STATUS_REDIRECT, $url);



This is a bug but they won’t address it. Line #58 above should be created as:

```php

_tpl_vars['navigation']['dynamic']['actions']) && (($this->_tpl_vars['navigation']['dynamic']['actions'] || $this->_tpl_vars['select_languages'] || $this->_tpl_vars['extra_tools'])): ?>

```

The issue is that the array: $this->_tpl_vars[‘navigation’] or $this->_tpl_vars[‘navigation’][‘dynamic’] is not set so it throws a run time error.



The template compiler should protect itself by using the if( !empty…) to prevent a run-time error.



Do you have any custom controlllers/addons installed on your system? Note that every addon controller should do a “return” with the appropriate array as the return value.



If your install is truly clean then cs-cart has a problem in one of the standard controllers that does something with options.

I didnt installed any new addon.

The only addon Im runnign besides the standar from cs-cart is the drop down menu and the flash banner from webgraphic.



I didnt any any issues before, this started all of the sudden. My options were allways on the store sicen day one, Im just trying to add new options and edit the ones already iside.

First I’d disable the drop-down menu and flash banner from webgraphic and see if the problem remains. If so, then I’d submit a bug report to cs-cart via the bugtracker. If the problem goes away, you will need to contact webgraphic.

I found we had to modify our server’s php.ini file. We had to add “suhosin” and make entries like:



suhosin.post.max_vars = 1000

suhosin.request.max_vars = 1000