Whenever I try to access theme editor from administer I get this error.
Fatal error: Only variables can be passed by reference in C:\Program Files\Apache Group\Apache2\htdocs\base\modules\theme_editor\theme_editor.module on line 519
Please let me know if there is any remedy for this problem.
Thank you.
~ Ranjeet
Comments
Comment #1
ced_garcia commentedWas able to reproduce on my machine.
Drupal 4.6.3
PHP 5.0.5
Apache 2.0.54
MySQL 4.1.8
Also line 519
I'm new to Drupal so I did not try to debug.
Comment #2
sky_diver_ commentedI had same error for Drupal system.module on line 650.
Workaround:
change
to
I did this every time error like this popped up (2 times by now in system.module).
It's some php bug I guess...
Regerds.
Comment #3
ced_garcia commentedThanks!! That seems to be the problem. Your fix is like danielc's official patch for the system.module bug. I installed it a while ago so I did not remmeber. See http://drupal.org/node/26033
I modified the theme_editor.module with the following: (line 519:)
function _theme_editor_check_dir() {
$tmp_var_ced = variable_get('theme_editor_path', 'theme_editor');
$tmp2_var_ced = file_create_path($tmp_var_ced);
if (!file_check_directory($tmp2_var_ced, FILE_CREATE_DIRECTORY)) {
return t('The theme storage directory does not exist or is not writable.');
}
}
...and everything was fixed. I tested the module and so far everything is working well. There are other instances of the file_create_path call in the module so I'm going to make further tests.
Ced
Comment #4
kodmasin commentedIt seems that people at PHP do not think that this is PHP bug (see http://bugs.php.net/bug.php?id=33643 ). So drupal should change code in way that rasmus suggests:
this is different than simple but ugly fixes like:
bye
boris
Comment #5
kodmasin commentedI was wrong. There is no way to escape ugly:
Sorry
Comment #6
kodmasin commentedJust for your information. Following code:
Throws "Fatal error: Only ..." in PHP5.1.0RC1 but not in PHP5.1.0RC3 so this is porobably PHP bug.
Comment #7
MVRider commentedNot sure if it has also been addressed in the node.module.
I also get that error on line 735 of node.module:
Quick Fix I made:
Comment #8
drupeall commentedI submitted a patch for theme_editor.module in http://drupal.org/node/49594
Comment #9
shane birley commented