Closed (cannot reproduce)
Project:
Storm
Version:
6.x-1.x-dev
Component:
Storm.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2010 at 19:09 UTC
Updated:
8 Jan 2011 at 00:42 UTC
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
Comment #1
juliangb commentedHave you changed the location of Storm icons via the settings page?
Or you deleted any directories from the Storm folder?
Comment #2
Christopher Riley commentedNo 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.
Comment #3
juliangb commentedWhat do you get if you put a
print_r($available);in the code just prior to theif(in_array...line?Comment #4
juliangb commentedComment #5
juliangb commentedCannot reproduce. Please reopen if this is still an issue and we can try to work out what is going on.