I enabled this module with aqcuia drupal distribution with some standard modules enabled and got following error
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /media/disk/workspace/prive_karolina/www/sites/all/modules/contrib/skinr/skinr.module on line 145.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /media/disk/workspace/prive_karolina/www/sites/all/modules/contrib/skinr/skinr.module on line 145.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /media/disk/workspace/prive_karolina/www/sites/all/modules/contrib/skinr/skinr.module on line 145.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /media/disk/workspace/prive_karolina/www/sites/all/modules/contrib/skinr/skinr.module on line 145.
I'm using the fusion theme and created a subtheme. What more information can I supply you?
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | skinr_in_array_error.patch | 766 bytes | sociotech |
Comments
Comment #1
bpinkney commentedI'm running PHP 5.3.1 and I get a similar error using Acquia Prosper:
* warning: in_array() expects parameter 2 to be array, string given in /var/www/vhosts/example.com/httpdocs/modules/skinr/skinr.module on line 145.
* warning: in_array() expects parameter 2 to be array, string given in /var/www/vhosts/example.com/httpdocs/modules/skinr/skinr.module on line 145.
* warning: in_array() expects parameter 2 to be array, string given in /var/www/vhosts/example.com/httpdocs/modules/skinr/skinr.module on line 145.
* warning: in_array() expects parameter 2 to be array, string given in /var/www/vhosts/example.com/httpdocs/modules/skinr/skinr.module on line 145.
Comment #2
jupiterchild commentedI can confirm this.
Today I updated Aqcuia Prosper to 6.x-1.0-beta3 and Fusion to 6.x-1.0-beta3. I ran update.php and flushed ALL caches and now receive this message when making changes to the Aqcuia Prosper theme:
warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/****/public_html/*****/store/sites/all/modules/skinr/skinr.module on line 145.
In this instance the issue occurs in the configuration form for Aqcuia Prosper >> Layout when switching between:
16 column fixed grid [960px] - Theme Default
and
16 column fluid grid
Comment #3
jupiterchild commented@ #2
Should have stated I am using:
Drupal 6.14
PHP 5.2.9
MySQL 5.1.30
Skinr 6.x-1.x-dev (2009-Nov-27)
Comment #4
TJM commentedI'm having the same problem.
..../www/sites/all/modules/contrib/skinr/skinr.module on line 145.
Drupal 6.14
PHP 5.2.9
MySQL 5.1.33
Panels 6.x-3.1
Skinr 6.x-1.1
Adaptivetheme 6.x-2.0-beta2
TJM
Comment #5
mattandersondc commentedI'm also seeing this error and I haven't switched from 16 column fixed grid [960px] - Theme Default
and
16 column fluid grid.
I have simply enabled the theme with the default and am seeing this same error.
Comment #6
jacineDon't use the dev version. You should all be using 6.x-1.1. Then make sure you are using the latest versions of Fusion and Acquia Prosper. If once you do that you are still having a problem let me know.
The development snapshot for D6 is now gone from the project page.
Comment #7
TJM commentedI'm using Skinr 6.x-1.1 module and I still get the error ...sites/all/modules/contrib/skinr/skinr.module on line 145..
Drupal 6.14
PHP 5.2.9
MySQL 5.1.33
Panels 6.x-3.1
Skinr 6.x-1.1
Adaptivetheme 6.x-2.0-beta2
TJM
Comment #8
iameric commentedSame problem here.
Drupal 6.14
MySQL 5.0.81
PHP 5.2.11
Skinr 6.x-1.1
Comment #9
akael commentedSame problem here, latest versions of Fusion and Acquia Prosper.
Comment #10
portait commentedI am also getting this error message.
Comment #11
ingopingo commentedSo am I.
Drupal 6.14
PHP 5.2.8-0
MySQL 5.1.30
Comment #12
mangaan commentedYep confirmed
Turnkey linux
Drupal 6.14
PHP 5.2.4
mysql 5.0.51a
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /etc/drupal/6/sites/all/modules/skinr/skinr.module on line 145.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /etc/drupal/6/sites/all/modules/skinr/skinr.module on line 145.
all modules are up to date as today
Comment #13
yha commentedsame problem, Fusion, Prosper
Comment #14
formalist commentedSame here. I get 4 lines like:
# warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\Drupal\cms\sites\all\modules\skinr\skinr.module on line 145.
Nevertheless, the module seems to works fine for me. Does it work fine also for all of you? Is someone experiencing problems, instead?
Thanks.
Comment #15
sociotech commentedEveryone, Jacine,
This one is our (TNT's) fault. In the latest version of Acquia Prosper, we used an "undocumented feature" of Skinr to disable an inherited skin in a sub-theme.
Basically, we wanted to inherit all the skins from Fusion Core except for the 12 column grid widths. We were trying to keep the interface of the sub-theme as non-confusing as possible after introducing the ability to use alternate grids (e.g., 12 column instead of 16 column) in the Fusion Core base theme. Obviously, having both 16 and 12 column grid widths in the block admin interface when your theme only uses a 16 column grid would cause some confusion.
The undocumented feature is that if you redefine the skin in the sub-theme's .info file but leave it blank, then it doesn't show up in the Skinr interface. The offending code is in lines 55-56 of acquia_prosper.info:
This technique works great and it's a crucial ability for us so we can pack as much functionality into the base theme, but not overwhelm the interface of a sub-theme with unused skins.
Ideally, we'd like to be able to keep this valuable feature, and I've attached a small patch (against 6.x-1.1) that eliminates the warning messages while keeping the feature intact. The alternatives for us are not great: either duplicating skins on a sub-theme-by-sub-theme basis (a maintenance/QA nightmare) or displaying unused skins in the interface (a usability nightmare).
If this isn't the approach you'd like to take or you have a better alternative for us, let me know.
Not sure why AdaptiveThemes would be throwing this error, unless they're using this technique as well.
Thanks!
Comment #16
mangaan commentedOK
this patch worked for me, keep up this wonderful project ;-))
Thanks !!
Comment #17
_cc_ commentedYes, patch worked for me too (well, I editted the file by hand, it's only a one line change).
Comment #18
jcmarco commentedWorks fine.
Thank you.
Comment #19
akael commentedWork here, thanks!
Comment #20
ingopingo commentedYep! Seems to work. Thx
Comment #21
jmbarlow commentedThe patch eliminates the error message for me (skinr 6.x-1.1 and Fusion 6.x-1.0-beta3)
Comment #22
dcarr commentedWorked for me! Thanks!
Comment #23
hhkont commentedHelp a newbie - how do you apply the patch?
Comment #24
jcmarco commentedhttp://drupal.org/node/60108
Comment #25
hhkont commentedThanks. Worked great.
Comment #26
2faroffroad commentedWorked.
Comment #27
robin.prieschl commentedHad the same problem with Beta 3.
Applied the patch above.
And now works fine. No Error.
Comment #28
willvincent commentedThis patch clears things up for me as well.
Comment #29
pepemty commentedI don't have SSH access :-(
Will this patch be committed?
Warm regards from sunny México!
:-)
Pepe
Edit:
Did a little reading, and (I know I really shouldn't) dared to do it "manually". Located the line marked with a (-) and changed it with the (+) one.
Everything seem OK now...
Comment #30
moonray commentedSeems useful. Committed to CVS.
Comment #31
MacRonin commentedJust read thru the issue, and now see why the msg went away when I switched to "Fusion Core" or Prosper. I just downloaded the themes in the last 24 hours so I'm probably have the patch already in place. ( had seen the msg all over a while back when I first put in my sandbox)
But in my current dev site, I sometimes also go back to the basics(Garland), just to see how something starts out before my changes. In that config (skinr still active) I still get the error msg. I'm guessing while its not pretty I can safely ignore in that situation?
BTW, Thanks for the great work, and enjoy the holiday.
Comment #32
hebhansen commentedPatch works thanks...
Comment #33
cbannerjee commentedThanks for the patch - it is nice to see such a quick response to even the small issues!
And, of course, thanks for the absolutely brilliant theme!
Comment #34
attheshow commentedsubscribing
Comment #35
plasticlax commentedpatch worked
Comment #36
jamesoakleyGlad this to hear that this is patched. How do we obtain the patched version? - 6.x-1.x-dev hasn't been updated since June, so that can't be it.
Comment #37
Jeff Burnz commentedNote: even if you are not using Fusion Starter if you have it enabled you will get this error - this is because Skinr builds the form elements for each enabled theme - so for those of you getting this error when using Adaptivetheme, Garland etc and you are not using Fusion Starter either disable Fusion Starter or apply the patch.
I spent quite some time trying the recreate this in Adaptivetheme without any joy, then it struck me to install and enable Fusion Starter.
The patch is a good fix and a sensible improvement; hoping to see a new release of Skinr soon with this as it is not clear if DEV is stable or if we should go on patching for the time being.
@#36 at time of writing DEV was last updated on Dec 18th, June 11th was the release date.
Comment #38
druplicate commentedWhen will this get fixed in Acquia Marina 3?
There's no dev version.
Comment #39
moonray commentedDev is stable and useable. Not all themes might be updated to work with it, though.
Since the last release there were no major changes in API for dev, though, so you should theoretically be good.
Themes written for dev might not necessarily work with the last release, though.
Comment #40
cgrant3d commentedsubscribe
Comment #41
roball commentedConfirmed that Skinr 6.x-1.x-dev (2009-Dec-29) works fine with Fusion 6.x-1.0-beta3, while the latest official stable release (6.x-1.1) issues the mentioned error whenever a block will be edited.
Comment #42
sociotech commentedmoonray,
I've been seeing a few instances in which our users are getting the following errors:
From what I've been able to tell, it's likely caused by using a disabling function (e.g., "skinr[grid16-width] =") on a setting that has been previously used. The disabling apparently overwrites settings saved into the Skinr entry for the theme in the Variables table with empty values. These empty values then get read back in as semicolons (";") and cause the invalid argument warnings above.
I was able to eliminate the errors by manually deleting the entry in the Variables table. It doesn't look like Skinr has an uninstall procedure, but that would be another way to clear the entry.
Of course, it would be ideal if there were a way to avoid creating or reading empty entries.
I'm continuing to look into this.
Thanks.
Comment #43
moonray commentedThe dev version already doesn't store empty values, but you'll have to resubmit each setting for it to take effect.
Another way right now is to export settings, edit them (if needed), then import them again.
An uninstall for Skinr is a good idea (I can't believe I forgot about it).
Comment #44
kevancummins commented"Confirmed that Skinr 6.x-1.x-dev (2009-Dec-29) works fine"
I can't seem to find the 6.x-1.x-dev (2009-Dec-29) download - can anyone send the link
Comment #45
kevancummins commentedI couldn't find the latest dev version for Dec 29 - so I applied the patch instead and it works great - thanks for the speedy fix.
Comment #46
roball commented@#45: http://drupal.org/node/488352/release => http://ftp.drupal.org/files/projects/skinr-6.x-1.x-dev.tar.gz
Comment #47
matiasc commentedWorked for me! Thanks!
Comment #48
vrajak@gmail.com commentedHave the same issue as above with the wrong array. I have the patch, but do not know how to apply it. Any help would be appreciated!
Comment #49
ChrisBryant commented@Vraja, If you read through the issue above you will see someone asked the same question (comment #24) and it was answered in comment #25 with a link to this page for applying patches:
http://drupal.org/node/60108
Also, please note that you shouldn't need to patch the module now though, rather read comment #30 where the patch is committed and #46 (http://drupal.org/node/648816#comment-2455508) which has a direct link to the dev version of skinr which already includes the patch.
Just download that and you should be good to go.
http://drupal.org/node/488352/release => http://ftp.drupal.org/files/projects/skinr-6.x-1.x-dev.tar.gz
Comment #50
vrajak@gmail.com commentedI did read through, but it wasn't clear to me. I'm pretty new at running a live site. Thanks so much for clarifying!