Closed (fixed)
Project:
Node Images
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2007 at 13:53 UTC
Updated:
15 Jan 2008 at 18:12 UTC
I am running Drupal with node_images on PHP 5.0.5 and get the following fatal error:
Fatal error: Only variables can be passed by reference in /home/httpd/vhosts/fischer-ryser.ch/httpdocs/content/modules/node_images/node_images.module on line 798
It turns out that the function file_check_directory() is called; it takes its first argument by reference but is given an (anonymous) expression. The fix is easy:
--- node_images.module.old 2007-02-16 14:45:03.192431662 +0100
+++ node_images.module 2007-02-16 14:45:34.307335064 +0100
@@ -795,7 +795,8 @@
$dirs = array();
foreach($folders as $folder) {
$dirs[] = $folder;
- if (!file_check_directory(implode("/", $dirs), $mode, $form_item)) {
+ $dir = implode("/", $dirs);
+ if (!file_check_directory($dir, $mode, $form_item)) {
mkdir(implode("/", $dirs));
}
}
Regards,
Kaspar
Comments
Comment #1
pembeci commentedI can confirm that the proposed patch fixed the issue for me too (also using PHP 5.0.5).
Comment #2
soupp commentedHelped me as well on 5.0.5. Thanks for hint.
Comment #3
stefano73 commentedComment #4
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.