After installing and enabling BUeditor & IMCE modules following the instruction, get the following error when trying to add a page or story:

Fatal error: Only variables can be passed by reference in /home/sites/web/modules/bueditor/bueditor.module on line 540

Ufuk suggests to add the line:
$file = dirname($file);
then pass this variable to file_check_directory function
return file_check_directory($file, .....

it seems work.

Thanks.

Comments

ufku’s picture

thanks for reporting this.
i think what i suggested before, breaks the rest of the code since $file variable requires to stay unchanged for further operations.
the fix is to change the buggy line with:
return file_check_directory($dir = dirname($file), FILE_CREATE_DIRECTORY) && ($fp = @fopen($file, 'w')) && @fwrite($fp, $data) && @fclose($fp) && @chmod($file, 0664);
it simply adds "$dir = " to make the function argument a real variable.

ufku’s picture

Status: Active » Closed (fixed)