Closed (fixed)
Project:
Bootstrap
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2015 at 12:31 UTC
Updated:
27 Dec 2015 at 17:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
pjcdawkins commentedComment #4
markhalliwellI actually just ended up removing the conditional since it's not really needed (it will return the complete form if there are no array parents). Still gave ya credit though, thanks!
Comment #5
pjcdawkins commentedThen you should remove the comment too. And I think your commit doesn't fix this: the point is that you need to make a temporary variable to pass as the first argument to Element::create(), because it is treated as a reference.
Comment #7
markhalliwellI'm not seeing this error. What version of PHP are you running?
Functions that return by reference (like NestedArray::getValue does) can be used as a parameter for a function/method that is expecting a referenced variable:
From http://php.net/manual/en/language.references.return.php:
I've fixed the comment.
Comment #8
markhalliwellFWIW I think you're confused as to why the error occurred before: it was a ternary expression (which doesn't return by reference).