Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets [duplicate]

本秂侑毒 提交于 2019-12-01 21:33:56

问题


I am getting following error

Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Price.php on line 126

On my server when try to filter product in product grid.

I am not changed any core files at all, but it showing the core file line 126.

I googled for this issue, no proper result. Is there anybody who got this problem and solved it.?

I am not sure but is this a PHP Version problem? Because same application working fine on localhost, In my local machine I have PHP 5.5.18 and in server its 5.3.

Thanks in advance :)


回答1:


I know this isn't a version problem, but could not tell you what it actually is. I just ran across the same issue on my localhost. It worked in one app, not the other, running php5.59.

Inspect the code, it is probably something like this:

$data[2] .= $additionaldata;

It needs to be changed to

$data[2] = $data[2].$additionaldata;



回答2:


I had the same issue! In my case, I declared a variable with an array and by mistake I just used it in another moment! Something like that:

$myArr = array();
// ...

$myArr = 'Some text';
// ...

$myArr[4] += 1; // Here the error shows!

So, basically.. I was trying to add 1 in a string. Then I just changed the string variable to another name and the problem was solved:

$someLabel = 'Some text';

I hope it helps you in your issue!



来源:https://stackoverflow.com/questions/26838247/fatal-error-cannot-use-assign-op-operators-with-overloaded-objects-nor-string-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!