Closed (fixed)
Project:
Multiple Domains
Version:
5.x-1.x-dev
Component:
code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 May 2007 at 20:28 UTC
Updated:
22 May 2007 at 16:31 UTC
I have a single subdomain configured and 'blog' selected under 'Use this domain for the following types of posts'. After creating a blog post, I'm receiving several errors reading 'warning: in_array(): Wrong datatype for second argument in ... multidomain/multidomain.module on line 466.'
These errors persist after deleting the blog node associated with the first instance of these errors. I suspect that other people would have observed this behavior since the latest release. Could there be something I am missing?
Comments
Comment #1
nedjoI'll have a look at this as soon as I get a chance, likely tomorrow (Tuesday).
Comment #2
ezra-g commentedThank you! I'm debugging now to see if I can find anything in the next hour.
Comment #3
ezra-g commentedSome preliminary investigation:
On line 466
I isolated line 466 into two separate statements.
The first part evaluated without error but evaluating
(in_array($node->type,$info['types'][$node->type]))threw an error.If an example $info array looks like this:
Then
$info['types'][$node->type]is a value, not a key.I hope this is helpful.
Comment #4
kgriffin commentedI am getting the same error. After looking at the code and the example ezra-g provided, it seems you are looking for a key, value pair in the second level of a multi-dimensional array...I am not a php expert by any means, but I looked into in_array in the PHP manual online and found the following:
It seems in_array is limited. Hopefully this function might help. OR, I could be way off base. If I am, excuse the post.
Comment #5
nedjoI'd put a parenthesis in the wrong place in the previous commit, for issue http://drupal.org/node/141223. Should work now.
Comment #6
kgriffin commentedYip. Warnings gone. Thanks. I wasn't completely off base, you just managed it differently...learning slowly but surely!
Comment #7
(not verified) commented