Hi agentrickard,
I'm getting the strangest PHP errors, noticed some of these before but never could reproduce. This time I can but it's still random...
When I use my default core search functionality, on some words/terms/keywords I get the following PHP errors;
* warning: Illegal offset type in isset or empty in sites/all/modules/domain/domain.module on line 1157.
* warning: Illegal offset type in sites/all/modules/domain/domain.module on line 1172.
* warning: Illegal offset type in sites/all/modules/domain/domain.module on line 1173.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in sites/all/modules/domain/domain_source/domain_source.module on line 208.
* warning: current() [function.current]: Passed variable is not an array or object in sites/all/modules/domain/domain_source/domain_source.module on line 209.
Now this only happens when I search with certain words, in my case searching on 'uiterwaard' (without quotes) I always get this error.
Now if I search on another word (like a telephone number) from nodes that also have the word 'uiterwaard' thus the result from the search are the exact same nodes I'm not getting this error?? So it's not the content-type causing the error I think.
What could be the cause of this??
Cheers
Comments
Comment #1
agentrickardThis is on HEAD?
Comment #2
agentrickardYou aren't on rc9 and you aren't on HEAD, so I need to know what functions are throwing these errors.
Comment #3
bartezz commentedAnother thing, this happens only when searching as user #1, they're also logged by watchdog.
When searching as anonymous I don't have this error.... not only NOT showing but also not logged by watchdog.
Cheers
Comment #4
bartezz commentedI am on rc9 with those patches we discussed in the other issue applied.
Cheers
Comment #5
agentrickardNot helpful. I need to know what functions those line numbers correspond to.
Comment #6
bartezz commentedFrom watchdog:
Will post the functions asap
Cheers
Comment #7
bartezz commentedComment #8
agentrickardI suspect $nid is coming in empty. Why would that be?
There is another new patch coming, #615258: Clean up source domain handling, which changes this lookup behavior.
Comment #9
bartezz commentedNot sure... is there anything you want me to test here?
Cheers
Comment #10
bartezz commentedFound the problem;
One of the nodes in the search results was set to "publish to:" [none checked] and "source domain:" [use active domain].
Now I don't know how this could have happened cause when I try to replicate these settings I can't submit the node and get a warning "publish to is a required field".
So somehwre along the line this got messed up??? But where? Can't find it in watchdog!
Closing for now, will open IF I find more info!
Cheers
Comment #11
agentrickardYou could watchdog($nid) in domain_get_node_domains().
I seem to recall that I had an instance where the function was passing $node instead of $node->nid, and I think I fixed that yesterday.
So if the watchdog shows an Object instead of a number, then that's the problem.
Comment #12
agentrickardProbably while we were debugging the validation step on changes to Domain Source handling.
Comment #13
bartezz commentedAh yes, that could be it!
Well I'll try the patch in the other issue tomorrow and leave this for now.
Cheers and thanx!