Please post the PHP version you are using. This sees to be a version specific problem.
Regards Jan
All right. The file mentioned in your error contains a function not supported by PHP v4. As PHP 4 is end-of-life since 2008 I will not fix this issue. Please update to PHP 5.
BTW: PHP 4.1.8 is REALLY OLD and has to be considered insecure!
Hi sorry, 4.1.8 is the version for myPhpAdmin. My php version is currently 5.2.17. Sorry for the wrong information.
PHP 5.2.x is not supported any more since January 2011, so you might consider to update. Which OS are you using?
The bug you mentioned is affecting PHP <= 5.2. I’ll have to think about if and how I’m going to fix this.
The fix seems to be easy. Could you please try to replace lines 51-68 in php/helper/admin_menu_helper.php by the following:
function f_comment( $entry ){
return $entry[0] == T_COMMENT;
}
function rpr_admin_template_list()
{
$dirname = WP_PLUGIN_DIR . '/recipepress-reloaded/templates/';
$templates = array();
if ($handle = opendir( $dirname )) {
while (false !== ($file = readdir($handle))) {
if( $file !='.' && $file !='..' && $file != '.svn' ) {
// Param parsing inspired by http://stackoverflow.com/questions/11504541/get-comments-in-a-php-file
// put in an extra function?
$params=array();
$filename = $dirname . $file . '/recipe.php';
$docComments = array_filter(
token_get_all( file_get_contents( $filename ) ),
/*function($entry) {
return $entry[0] == T_COMMENT;
}*/
"f_comment"
);
This should fix the problem. Thanks for testing this for me, as I can’t test the plugin against all available PHP versions.
Regards Jan