Skip to content

Commit bf26eee

Browse files
committed
refactor: rimozione warning da riga di comando
1 parent 4a63285 commit bf26eee

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/App.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ public static function definePaths($docroot)
152152
$rootdir = str_replace('%2F', '/', rawurlencode($rootdir));
153153

154154
// Individuazione di $baseurl
155-
$baseurl = (isHTTPS(true) ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].$rootdir;
155+
if (php_sapi_name() == 'cli') {
156+
$baseurl = '';
157+
} else {
158+
$baseurl = (isHTTPS(true) ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].$rootdir;
159+
}
156160

157161
// Impostazione delle variabili globali
158162
define('DOCROOT', $docroot);

0 commit comments

Comments
 (0)