The function book_export_traverse() accepts a callback parameter as it's second argument, however only if that callback is a standalone function yet it uses call_user_func() and should therefore accept any valid callback using the is_callable() test rather than the more restrictive function_exists().
This would allow the use of lambda functions or array style callbacks within a class.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | book_export_traverse-1707904-4.patch | 486 bytes | michaellenahan |
| #1 | book_export_traverse-1707904-1.patch | 486 bytes | michaellenahan |
Comments
Comment #1
michaellenahan commentedHere's a patch.
Comment #2
michaellenahan commentedComment #3
tim.plunkettComment #4
michaellenahan commentedUploading once more to see if I can trigger testbot. Thanks @tim.plunkett for setting to 7.x.
Comment #5
tim.plunkettThis is not relevant to Drupal 8, because the function_exists call was removed, see \Drupal\book\BookExport::exportTraverse()