Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The method get_join() of a views_handler class should always return something, otherwise PHP throws strict warnings. Patch attached.
Comments
Comment #1
klausiWhoops, wrong patch, of course that line should not be commented out.
Comment #2
dawehnerI'm wondering when this bug came up. Perhaps some kind of underlying bug caused this.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedI 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.
Comment #4
dawehnerSo This issue seems to be closed won't fix?
Comment #5
klausiNo, the code in views_many_to_one_helper->ensure_my_table() needs to check if an object or NULL was returned.
Comment #6
pillarsdotnet CreditAttribution: pillarsdotnet commentedAlternative patch, created against 6.x-3.x (which has the same problem)
Comment #7
pillarsdotnet CreditAttribution: pillarsdotnet commentedBah. Patched that in the wrong place. Corrected:
EDIT: Note that this is the 6.x-3.x version of the patch.
Comment #8
pillarsdotnet CreditAttribution: pillarsdotnet commentedHere's the patch against the 7.x-3.x branch.
Comment #9
dawehnerLooks fine. Commited to both branches.