require in eval broken when path includes an apostrophe
-
Error:
Parse error: syntax error, unexpected 's' (T_STRING) in /Users/james/Work/Projects/Kathy's Creative Flowers/WebsiteTest/www/wp-content/plugins/newsletter/includes/module.php(505) : eval()'d code on line 1
Eval’d code:
function newsletter_main_index(){global $newsletter, $wpdb;require '/Users/james/Work/Projects/Kathy<strong>'</strong>s Creative Flowers/WebsiteTest/www/wp-content/plugins/newsletter/main/index.php';}
Fix (line 505 and line 518):
eval('function ' . $name . '(){global $newsletter, $wpdb;require \'' . <strong>addslashes($file)</strong> . '\';}');
eval(‘function ‘ . $name . ‘(){global $newsletter, $wpdb;require \” .addslashes($file)
. ‘\’;}’);
- The topic ‘require in eval broken when path includes an apostrophe’ is closed to new replies.