Skip to content

Commit

Permalink
webui: replace !empty() with strlen()>0
Browse files Browse the repository at this point in the history
In PHP versions prior to 5.5 (as e.g. on RHEL/CentOS 7) empty() can only
be used with variables and not function return values.
  • Loading branch information
arogge committed Nov 6, 2019
1 parent ba64c46 commit a1e13be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webui/config/autoload/global.php.in
Expand Up @@ -35,7 +35,7 @@
* file.
*/

if(!empty(getenv('BAREOS_WEBUI_CONFDIR'))) {
if(strlen(getenv('BAREOS_WEBUI_CONFDIR')) > 0) {
$directors_ini = getenv('BAREOS_WEBUI_CONFDIR')."/directors.ini";
$configuration_ini = getenv('BAREOS_WEBUI_CONFDIR')."/configuration.ini";
} else {
Expand Down

0 comments on commit a1e13be

Please sign in to comment.