Ver código fonte

Fix remove warnings

Laurent Destailleur 1 ano atrás
pai
commit
81e96f8787

+ 1 - 1
htdocs/admin/tools/listevents.php

@@ -440,7 +440,7 @@ if ($result) {
 			print '</td>';
 		}
 
-		// Date
+		// ID
 		print '<td class="nowrap left">'.dol_escape_htmltag($obj->rowid).'</td>';
 
 		// Date

+ 2 - 1
htdocs/core/class/translate.class.php

@@ -266,7 +266,8 @@ class Translate
 			$file_lang = $searchdir . ($modulename ? '/' . $modulename : '') . "/langs/" . $langofdir . "/" . $newdomain . ".lang";
 			$file_lang_osencoded = dol_osencode($file_lang);
 
-			$filelangexists = is_file($file_lang_osencoded);
+			//$filelangexists = is_file($file_lang_osencoded);
+			$filelangexists = @is_file($file_lang_osencoded);	// avoid [php:warn]
 
 			//dol_syslog(get_class($this).'::Load Try to read for alt='.$alt.' langofdir='.$langofdir.' domain='.$domain.' newdomain='.$newdomain.' modulename='.$modulename.' file_lang='.$file_lang." => filelangexists=".$filelangexists);
 			//print 'Try to read for alt='.$alt.' langofdir='.$langofdir.' domain='.$domain.' newdomain='.$newdomain.' modulename='.$modulename.' this->_tab_loaded[newdomain]='.$this->_tab_loaded[$newdomain].' file_lang='.$file_lang." => filelangexists=".$filelangexists."\n";

+ 4 - 2
htdocs/core/lib/functions.lib.php

@@ -1168,7 +1168,8 @@ function dol_buildpath($path, $type = 0, $returnemptyifnotfound = 0)
 				if ($key == 'main') {
 					continue;
 				}
-				if (file_exists($dirroot.'/'.$path)) {
+				// if (@file_exists($dirroot.'/'.$path)) {
+				if (@file_exists($dirroot.'/'.$path)) {	// avoid [php:warn]
 					$res = $dirroot.'/'.$path;
 					return $res;
 				}
@@ -1215,7 +1216,8 @@ function dol_buildpath($path, $type = 0, $returnemptyifnotfound = 0)
 			preg_match('/^([^\?]+(\.css\.php|\.css|\.js\.php|\.js|\.png|\.jpg|\.php)?)/i', $path, $regs); // Take part before '?'
 			if (!empty($regs[1])) {
 				//print $key.'-'.$dirroot.'/'.$path.'-'.$conf->file->dol_url_root[$type].'<br>'."\n";
-				if (file_exists($dirroot.'/'.$regs[1])) {
+				//if (file_exists($dirroot.'/'.$regs[1])) {
+				if (@file_exists($dirroot.'/'.$regs[1])) {	// avoid [php:warn]
 					if ($type == 1) {
 						$res = (preg_match('/^http/i', $conf->file->dol_url_root[$key]) ? '' : DOL_URL_ROOT).$conf->file->dol_url_root[$key].'/'.$path;
 					}

+ 1 - 1
htdocs/user/logout.php

@@ -50,7 +50,7 @@ if (!empty($_SESSION["dol_authmode"]) && ($_SESSION["dol_authmode"] == 'forceuse
 	unset($_SESSION["dol_login"]);
 	unset($_SESSION['dol_entity']);
 	unset($_SESSION['urlfrom']);
-	die("Applicative disconnection should be useless when connection was made in mode ".$_SESSION["dol_authmode"]);
+	die("Applicative disconnection should be useless when connection was made in mode ".$_SESSION["dol_authmode"]);	// TODO Really ? It at least delete the session file ?!
 }
 
 //global $conf, $langs, $user;