Amasty Address Attributes Notice Bug
Using Amasty Attributes to add Address attributes, the following error occurs after first save of Titles/Labels:
Notice: Array to string conversion in /home/company/project/site/web/ app/design/adminhtml/default/default/template/ amaddressattr/attribute/options.phtml on line 46 #0 .../app/design/adminhtml/default/default/template/ amaddressattr/attribute/options.phtml(46): mageCoreErrorHandler(8, 'Array to string conversion', '.../app/design/adminhtml/default/default/template/ amaddressattr/attribute/options.phtml', 46, Array)
Test system configuration
- Magento CE 1.7.0.2
- Amasty Address Attributes 1.0.1
Quick Debugging
Trying to debug, modified the code like this:
<tr>
<?php $_labels = $this->getLabelValues();
//MMA
?>
<?php foreach ($this->getStores() as $_store):
Zend_Debug::dump($_store->getId(), 'store, ');
if (is_array($_labels[$_store->getId()])) {
Zend_Debug::dump($_store->getId(), ' - for this storeid the label is array!');
$_labels[$_store->getId()] = implode(',', $_labels[$_store->getId()]);
}
//Zend_Debug::dump($_labels[$_store->getId()]);
?>
<td>
<input class="input-text<?php if($_store->getId()==0): ?> required-option<?php endif; ?>"
type="text" name="frontend_label[<?php echo $_store->getId() ?>]"
value="<?php echo $this->htmlEscape($_labels[$_store->getId()]) ?>" />
</td>
<?php endforeach; ?>
</tr>
The result is this:
Trying to quick fix
<tr>
<?php foreach ($this->getStores() as $_store): ?>
<th><?php echo $_store->getName() ?></th>
<?php endforeach; ?>
</tr>
<tr>
<?php $_labels = $this->getLabelValues()?>
<?php foreach ($this->getStores() as $_store):?>
<td>
<input class="input-text<?php if($_store->getId()==0): ?> required-option<?php endif; ?>"
type="text" name="frontend_label[<?php echo $_store->getId() ?>]"
value="<?php echo $this->htmlEscape((is_array($_labels[$_store->getId()]) ? implode('', $_labels[$_store->getId()]) : $_labels[$_store->getId()])) ?>" />
</td>
<?php endforeach; ?>
</tr>
Quick Fix Result

Managed to get Magento flow not to break, but it seems it does not set up further required database configuration, and we get this Notice message from a Magento core setup file.
Further references found online
- Same notice bug, same line of code, but from another Magento extension (i Customer Information):
http://www.magentocommerce.com/boards/viewthread/894445/





