1

When i open 'customer configuration' from the system configuration, I got the fatal error:

Warning: Illegal string offset 'value' in httpdocs/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php on line 111

This fatal error only appears when i select a website value different than 'default config'.

  • Have you solved this? – karstenm Sep 6 '17 at 9:21
3

This appears to be an issue with PHP 5.4+

You should NEVER rewrite core files unless absolutely necessary.

  1. Create a new file:

    app/code/local/Mage/Adminhtml/Block/System/Config/Form/Field.php

  2. Copy contents from

    app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php to app/code/local/Mage/Adminhtml/Block/System/Config/Form/Field.php

  3. Replace line 111 with the following: } elseif ((isset($v['value'])) && ($v['value']==$defText)) {

This should correct your error.

1

It's not about PHP version but Magento itself. For sure it has been FIXED in 1.9.3.2, maybe even earlier :) It looks like this:

if ($options) {
  $defTextArr = array();
  foreach ($options as $k=>$v) {
    if ($isMultiple) {
        if (is_array($v['value']) && in_array($k, $v['value'])) {
            $defTextArr[] = $v['label'];
        }
    } elseif (isset($v['value'])) {
        if ($v['value'] == $defText) {
            $defTextArr[] = $v['label'];
            break;
        }
    } elseif (!is_array($v)) {
        if ($k == $defText) {
            $defTextArr[] = $v;
            break;
        }
    }
  }
  $defText = join(', ', $defTextArr);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.