<body class="<?= $body_classname ?>">PHP has never really complained about it, but FuelPHP is displaying notices on my page...
[b]Notice![/b] ErrorException [ NOTICE ]: Undefined variable "body_classname" [b]APPPATH/views/template.php @ line 49[/b]
// old, defaults to development 43. 'environment' => (isset($_SERVER['FUEL_ENV']) ? $_SERVER['FUEL_ENV'] : Fuel::DEVELOPMENT), // new, defaults to production 43. 'environment' => (isset($_SERVER['FUEL_ENV']) ? $_SERVER['FUEL_ENV'] : Fuel::PRODUCTION),Am I missing something, or is this an issue? Thanks!
// try a compact tertiary <body class="<? $body_classname ?: '' "> // try a good ol' if-then <? if ( $body_classname ): ?> <body class="<?= $body_classname ?>"> <? else: ?> <body> <? endif; ?>Turns out I misread the PHP docs a long time ago. I always thought these two statements were identical when $var is undeclared:
1. if ( $var ) ... 2. if ( ! empty( $var ) ) ...They are basically identical, however, PHP issues a warning in the first case when the variable is not set.
"empty() is the opposite of (boolean) var, except that no warning is generated when the variable is not set."
http://php.net/manual/en/function.empty.php
if (\Fuel::$is_test or ( ! $always_show and (\Fuel::$env == \Fuel::PRODUCTION or \Config::get('errors.notices', true) === false))) { return; }
It looks like you're new here. If you want to get involved, click one of these buttons!