Closed (fixed)
Project:
phpFreeChat integration
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2008 at 03:11 UTC
Updated:
1 Dec 2008 at 05:11 UTC
When I installed this module and tried to go to phpchatroom settings, I got the following error:
Fatal error: Only variables can be passed by reference in line 60 /modules/phpfreechat/phpfreechat.inc
Some searching pointed to this being a problem with PHP 5.0.5 (see: http://drupal.org/node/32881 )
I was able to get this to work by changing this:
function _phpfreechat_check_files() {
// Create data folders:
// PS: I had to pass first parameter as a variable since file_check_directory
// accepts only variables since it references the first parameter
return (
file_check_directory(file_directory_path(), FILE_CREATE_DIRECTORY, 'op')
&& file_check_directory($f = PHPFREECHAT_DATA_DIR, FILE_CREATE_DIRECTORY, 'op')
&& file_check_directory($f = PHPFREECHAT_PRIVATE_DIR, FILE_CREATE_DIRECTORY, 'op')
&& file_check_directory($f = PHPFREECHAT_PUBLIC_DIR, FILE_CREATE_DIRECTORY, 'op'));
}to this:
function _phpfreechat_check_files() {
// Create data folders:
// PS: I had to pass first parameter as a variable since file_check_directory
// accepts only variables since it references the first parameter
$chat_path = file_directory_path();
return (
file_check_directory($chat_path, FILE_CREATE_DIRECTORY, 'op')
&& file_check_directory($f = PHPFREECHAT_DATA_DIR, FILE_CREATE_DIRECTORY, 'op')
&& file_check_directory($f = PHPFREECHAT_PRIVATE_DIR, FILE_CREATE_DIRECTORY, 'op')
&& file_check_directory($f = PHPFREECHAT_PUBLIC_DIR, FILE_CREATE_DIRECTORY, 'op'));
}Not sure if that's a good solution, but thought I'd at least point it out.
Comments
Comment #1
permutations commentedFixed in the current version, 5.x-1.2.