0

I'm seeing a lot of the following warnings after upgrading to 1.9.3.1 in the system.log:

"Warning: strpos() expects parameter 1 to be string, array given  in ../app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Table.php on line 79"
"Warning: strpos() expects parameter 1 to be string, array given  in ../app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Table.php on line 79"
"Warning: strpos() expects parameter 1 to be string, array given  in ../app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Table.php on line 79"

Also checked the affected Model already near line 79 it says..

...
70: /**
71:  * Get a text for option value
72:  *
73:  * @param string|integer $value
74:  * @return string
75:  */
76: public function getOptionText($value)
77: {
78:   $isMultiple = false;
79:    if (strpos($value, ',')) {  # <--- this line causes the warning...
80:        $isMultiple = true;
81:        $value = explode(',', $value);
82:    }
83:
84:    $options = $this->getAllOptions(false);
...

Any ideas how to fix this?

3
  • try to check $value by if condition. that should not be blank
    – Kul
    Commented Jan 19, 2017 at 15:04
  • Is this code from "the affected Model" in a custom module, a third party extension or in the core?
    – 7ochem
    Commented Jan 19, 2017 at 15:12
  • I'm guessing there is a call to getOptionText that is being done from an extension that is causing you issue? You could add some additional logging in there to dump the offending value and see if you can track it down? Commented Jan 19, 2017 at 16:35

1 Answer 1

2

Thanks for the hints. I've successfully identified the problematic module Official Ingenico ePayments Extension and upgraded it. Now the issue is solved.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.