Receiving an error when cron runs. Anyone else seeing something similar?

in_array() [function.in-array]: Wrong datatype for second argument in /some/path/public_html/sites/all/modules/storm/storm.module on line 712.

I modified the function as follows:

if (in_array($icon .'.png', $available->data)) {

to

if (!empty($available->data) && in_array($icon .'.png', $available->data)) {

This checks to make sure that $available->data is not an empty array thus preventing the error.

Suggestions? Comments?

Comments

juliangb’s picture

Have you changed the location of Storm icons via the settings page?

Or you deleted any directories from the Storm folder?

Christopher Riley’s picture

No that is the first thing that I thought of. I then verified permissions of the files and when I was still getting the error I decided to pipe out the name of the file to the error log to get the name of it so that I could verify that it was there. What I gleaned from that is for some reason it is looking for the file multiple times before it finds it and continues.

juliangb’s picture

What do you get if you put a print_r($available); in the code just prior to the if(in_array... line?

juliangb’s picture

Title: Error when during cron run » Error when during cron run (icon cache)
Status: Active » Postponed (maintainer needs more info)
juliangb’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Cannot reproduce. Please reopen if this is still an issue and we can try to work out what is going on.