1

I've installed an extension to Magento that switches customers groups, the cron that it runs is giving me the following error:

TRIGGER: shutdown function Last error:

Array ( [type] => 4 [message] => syntax error, unexpected '[' [file] => /var/www/vhosts/xxxxxxxxx.com/httpdocs/app/code/local/Plugincompany/Groupswitch/Model/Mysql4/Rule/Collection.php [line] => 32 ) 
    if(!$ids) return $this;
    if(!is_array($ids)) $ids = array($ids);
    return $this->addFieldToFilter('rule_id', ['in' => $ids]);

Line 32 is the last line above. It's running PHP 5.6.

Anyone got any ideas how to solve the issue?

Thanks.

| improve this question | | | | |
1

It's a php version compatibility issue with the code

Rewrite

['in' => $ids]

To

array('in' => $ids)

| improve this answer | | | | |

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.