Why does include bomb when the path does not exist?

32 views
Skip to first unread message

Richard Catto

unread,
Nov 30, 2017, 5:32:49 AM11/30/17
to Fat-Free Framework
require is supposed to bomb when it can't find the path, but include is supposed to carry on.

Fat free bombs out when an include fails to load the path

ved

unread,
Nov 30, 2017, 8:32:37 AM11/30/17
to Fat-Free Framework
Please show us the code where/how this is happening and the exact error message.

xfra35

unread,
Nov 30, 2017, 12:31:30 PM11/30/17
to Fat-Free Framework
Both functions trigger an error, but require triggers an E_ERROR while include triggers an E_WARNING.

F3 sets error_reporting to (E_ALL|E_STRICT)&~(E_NOTICE|E_USER_NOTICE), which means that all errors apart from notices are intercepted.

Bcosca made it clear that this is intentional.

Anyway nothing prevents you from modifying the error_reporting just after calling base.php:

$f3 = require('lib/base.php');
error_reporting
((E_ALL|E_STRICT)&~(E_WARNING|E_NOTICE|E_USER_NOTICE));



Richard Catto

unread,
Dec 7, 2017, 2:17:25 AM12/7/17
to Fat-Free Framework
Thanks. 
Reply all
Reply to author
Forward
0 new messages