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

pembeci’s picture

I can confirm that the proposed patch fixed the issue for me too (also using PHP 5.0.5).

soupp’s picture

Helped me as well on 5.0.5. Thanks for hint.

stefano73’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.