Skip to main content
Bumped by Community user
deleted 2 characters in body; edited tags
Source Link
7ochem
  • 7.6k
  • 14
  • 52
  • 80

I'm seeing a lot of the following warnings after upgrading to 1.9.3.1 in the system.logsystem.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?

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?

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?

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?

Thanks

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?

Thanks

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?

Source Link
user49573
user49573

Magento 1.9.3 - "Warning: strpos() expects parameter 1 to be string" warnings

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?

Thanks