Skip to content

Commit c7cb7bf

Browse files
committed
* Simplify detection logic
1 parent a0d34f4 commit c7cb7bf

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/IDS/Init.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,13 @@ public static function init($configPath = null)
111111
* If all that tests succeed the base path will be returned as a string -
112112
* else null will be returned.
113113
*
114-
* @return string the base path or null
114+
* @return string|null the base path or null
115115
*/
116116
public function getBasePath()
117117
{
118-
return ((isset($this->config['General']['base_path'])
119-
&& $this->config['General']['base_path']
120-
&& isset($this->config['General']['use_base_path'])
121-
&& $this->config['General']['use_base_path'])
122-
? $this->config['General']['base_path'] : null);
118+
return (!empty($this->config['General']['base_path'])
119+
&& !empty($this->config['General']['use_base_path']))
120+
? $this->config['General']['base_path'] : null;
123121
}
124122

125123
/**

0 commit comments

Comments
 (0)