The method get_join() of a views_handler class should always return something, otherwise PHP throws strict warnings. Patch attached.

Comments

klausi’s picture

StatusFileSize
new302 bytes

Whoops, wrong patch, of course that line should not be commented out.

dawehner’s picture

I'm wondering when this bug came up. Perhaps some kind of underlying bug caused this.

merlinofchaos’s picture

Status: Needs review » Needs work

I agree, it's valid to return NULL if there is no join object. Whatever code is using get_join() might need to test to see that the returned join was valid. That's a better fix, IMO.

dawehner’s picture

So This issue seems to be closed won't fix?

klausi’s picture

No, the code in views_many_to_one_helper->ensure_my_table() needs to check if an object or NULL was returned.

pillarsdotnet’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Component: Miscellaneous » Code
Status: Needs work » Needs review
StatusFileSize
new839 bytes

Alternative patch, created against 6.x-3.x (which has the same problem)

pillarsdotnet’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
StatusFileSize
new1.09 KB

Bah. Patched that in the wrong place. Corrected:

EDIT: Note that this is the 6.x-3.x version of the patch.

pillarsdotnet’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
StatusFileSize
new1.09 KB

Here's the patch against the 7.x-3.x branch.

dawehner’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Needs review » Fixed

Looks fine. Commited to both branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.