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.
You get a warning when try to see any book type node:
strict warning: Only variables should be passed by reference in /usr/local/www/apache22/data/modules/book/book.module on line 559.
line 559 of book.module:
$data = array_shift(book_menu_subtree_data($prev));
Solution/Workaround:
Split line 559 of the book.module like this:
$pepito = book_menu_subtree_data($prev);
$data = array_shift($pepito);
Comment | File | Size | Author |
---|---|---|---|
#18 | book-php5-strict-1707928-18.patch | 747 bytes | jstoller |
#1 | 1707928-1-book-php5-strict.patch | 757 bytes | joelpittet |
Comments
Comment #1
joelpittetHere's the patch as indicated in the issue summary.
Comment #2
DarrellDuane CreditAttribution: DarrellDuane commentedI applied this patch and the error messages stopped. Please commit.
Comment #6
Polonium CreditAttribution: Polonium commentedPlease, look at my work.
Comment #8
joelpittet@Polonium I've got a hard time trying to figure out if that is spam or not? It looks like you took the patch in #1 and added some persons name into it as a variable name and the patch is not a correct patch without the + or -.
Can you explain what you were trying to do in #6 that is different thand #1?
Comment #9
tadityar CreditAttribution: tadityar commented@joelpittet hello! This issue had been RTBC-ed and also passed the test so what's the problem here?
Comment #10
dawehneras said on irc #1 is fine, but the question is whether the problem also appears in D7?
Comment #11
tadityar CreditAttribution: tadityar commentedI tested the 7.x branch in simplytest.me, tried creating a book nodetype and its child, and when I tried to see it there are no PHP strict warning. The patch previously failed because of testbot issues and re-testing solved it.
The patch in #1 also solved the issue based on #2 so re-upping the RTBC :)
Comment #13
tadityar CreditAttribution: tadityar commentedThe wrong patch got tested.. sorry.
Comment #14
joelpittetThanks @tadityar and @DarrellDuane for testing it:)
Comment #15
RytoEX CreditAttribution: RytoEX commentedI just ran into this today while testing Drupal 6 on PHP 5.4. If the patch from #1 fixes this and is RTBC, what's keeping this from moving to be Fixed?
Comment #16
dazweeja CreditAttribution: dazweeja commentedPlease commit this two-line patch. It solves the issue and is just good coding practice.
Comment #18
jstollerHere's a working patch, in case anyone else needs it.
Comment #19
dsnopekMoving to D6LTS project
Comment #20
dsnopekCommitted the patch in #18 to the D6LTS fork:
https://github.com/d6lts/drupal/commit/befcc037588dc582f19fb28cc6741a73d...