-
Notifications
You must be signed in to change notification settings - Fork 873
Fatal error: #308
Comments
@josh-rathke : any ideas? Referring to issue #297 is seems like this bug was introduced in this commit 7acc16c |
Have adopted @LukePettway solution, which seems to work for me. |
I wonder if We are only checking if the file name is exactly |
The reason I added the sanitization functions is because without them, the build does not pass WordPress Coding Standards. This is the error that it throws up: FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
39 | ERROR | Detected usage of a non-sanitized input variable:
| | $_SERVER (WordPress.VIP.ValidatedSanitizedInput.)
---------------------------------------------------------------------- Further research on that particular error code will eventually bring you to this site which explains the how and why, but it would seem that it's geared far more towards user input. All that to say, we could just omit that check from the test and leave it un-sanitized. |
Ah, yeah it's definitely useful for files uploaded from users, "Never trust user input" is a good mantra. :) In this case it seemed unnecessary, but if it does not pass the check then maybe the solution by LukePettway is the way to go? Or maybe there's a better way than checking
I don't know if there's any downside to it, though, but it seems to be suggested for templates as well. And btw, line 40: die (__( 'Please do not load this page directly. Thanks!', 'FoundationPress' )); } should be die ( __( 'Please do not load this page directly. Thanks!', 'FoundationPress' ) );
} ;) |
I think using the WP Codex's method is cleaner. It makes more sense on an On Mon, Apr 20, 2015 at 7:40 AM, Adrian Bengtson notifications@github.com
|
Have just started developing a theme with Foundationpress. Nothing has been done other than set up a static 'front-page.php' and change text domain. The following error is now being thrown on front page and post pages. Seems to have been caused by the front page somehow.
Fatal error: Can't use function return value in write context in C:\Program Files\Ampps\www\retro-resources-v4\wp-content\themes\retroresouces\comments.php on line 39
If anyone can shed some light on this issue it would be much appreciated.
Anthony
The text was updated successfully, but these errors were encountered: