Skip to content
Extraits de code Groupes Projets
Valider 56209ad0 rédigé par marcimat's avatar marcimat
Parcourir les fichiers

Corrections de notices PHP

parent 7f6cd3d2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -210,8 +210,10 @@ if (!class_exists('nanoSha2')) ...@@ -210,8 +210,10 @@ if (!class_exists('nanoSha2'))
$pad = ceil(($length+1+32/$this->bytesString)/$npad)*$npad-32/$this->bytesString; $pad = ceil(($length+1+32/$this->bytesString)/$npad)*$npad-32/$this->bytesString;
$ords = array_pad($ords,$pad,0); $ords = array_pad($ords,$pad,0);
$mask = (1 << $this->bytesString) - 1; $mask = (1 << $this->bytesString) - 1;
for($i = 0; $i < count($ords) * $this->bytesString; $i += $this->bytesString) for($i = 0; $i < count($ords) * $this->bytesString; $i += $this->bytesString) {
if (!isset($bin[$i>>5])) { $bin[$i>>5] = 0; } // pour eviter des notices.
$bin[$i>>5] |= ($ords[$i / $this->bytesString] & $mask) << (24 - $i%32); $bin[$i>>5] |= ($ords[$i / $this->bytesString] & $mask) << (24 - $i%32);
}
$bin[] = $length*$this->bytesString; $bin[] = $length*$this->bytesString;
return $bin; return $bin;
} }
......
...@@ -72,6 +72,7 @@ function ajax_retour($corps, $content_type = null){ ...@@ -72,6 +72,7 @@ function ajax_retour($corps, $content_type = null){
$c = $GLOBALS['meta']["charset"]; $c = $GLOBALS['meta']["charset"];
header('Content-Type: '.$content_type.'; charset='.$c); header('Content-Type: '.$content_type.'; charset='.$c);
$debut = (($xml AND strlen(trim($corps))) ? '<'."?xml version='1.0' encoding='".$c."'?".">\n" : ''); $debut = (($xml AND strlen(trim($corps))) ? '<'."?xml version='1.0' encoding='".$c."'?".">\n" : '');
$fin = "";
} }
echo $debut, $corps, $fin, $e; echo $debut, $corps, $fin, $e;
} }
......
...@@ -83,7 +83,7 @@ function autoriser_dist($faire, $type='', $id=0, $qui = NULL, $opt = NULL) { ...@@ -83,7 +83,7 @@ function autoriser_dist($faire, $type='', $id=0, $qui = NULL, $opt = NULL) {
if (_ADMINS_RESTREINTS AND is_array($qui)) if (_ADMINS_RESTREINTS AND is_array($qui))
$qui['restreint'] = liste_rubriques_auteur($qui['id_auteur']); $qui['restreint'] = liste_rubriques_auteur($qui['id_auteur']);
if (_DEBUG_AUTORISER) spip_log("autoriser $faire $type $id ($qui[nom]) ?"); if (_DEBUG_AUTORISER) spip_log("autoriser $faire $type $id (" . (isset($qui['nom']) ? $qui['nom'] : '') . ") ?");
// passer par objet_type pour avoir les alias // passer par objet_type pour avoir les alias
// et supprimer les _ // et supprimer les _
...@@ -122,7 +122,7 @@ function autoriser_dist($faire, $type='', $id=0, $qui = NULL, $opt = NULL) { ...@@ -122,7 +122,7 @@ function autoriser_dist($faire, $type='', $id=0, $qui = NULL, $opt = NULL) {
} }
} }
if (_DEBUG_AUTORISER) spip_log("$f($faire,$type,$id,$qui[nom]): ".($a?'OK':'niet')); if (_DEBUG_AUTORISER) spip_log("$f($faire,$type,$id," . (isset($qui['nom']) ? $qui['nom'] : '') . "): ".($a?'OK':'niet'));
return $a; return $a;
} }
......
...@@ -133,7 +133,7 @@ if (isset($GLOBALS['_INC_PUBLIC']) AND $GLOBALS['_INC_PUBLIC']) { ...@@ -133,7 +133,7 @@ if (isset($GLOBALS['_INC_PUBLIC']) AND $GLOBALS['_INC_PUBLIC']) {
$affiche_boutons_admin = ($html AND (( $affiche_boutons_admin = ($html AND ((
isset($_COOKIE['spip_admin']) isset($_COOKIE['spip_admin'])
AND !$flag_preserver AND (!isset($flag_preserver) OR !$flag_preserver)
) OR $debug)); ) OR $debug));
if ($affiche_boutons_admin) if ($affiche_boutons_admin)
......
...@@ -47,10 +47,10 @@ function formulaires_login_charger_dist($cible="",$login="",$prive=null) ...@@ -47,10 +47,10 @@ function formulaires_login_charger_dist($cible="",$login="",$prive=null)
$valeurs = array( $valeurs = array(
'var_login' => $login, 'var_login' => $login,
'editable' => !$row, 'editable' => !$row,
'cnx' => $row['cnx'], 'cnx' => isset($row['cnx']) ? $row['cnx'] : '',
'auth_http' => login_auth_http(), 'auth_http' => login_auth_http(),
'rester_connecte' => ((_RENOUVELLE_ALEA < 12*3600)? '' : ' '), 'rester_connecte' => ((_RENOUVELLE_ALEA < 12*3600)? '' : ' '),
'_logo' => $row['logo'], '_logo' => isset($row['logo']) ? $row['logo'] : '',
'_alea_actuel' => isset($row['alea_actuel'])?$row['alea_actuel']:'', '_alea_actuel' => isset($row['alea_actuel'])?$row['alea_actuel']:'',
'_alea_futur' => isset($row['alea_futur'])?$row['alea_futur']:'', '_alea_futur' => isset($row['alea_futur'])?$row['alea_futur']:'',
'_pipeline' => 'affiche_formulaire_login', // faire passer le formulaire dans un pipe dedie pour les methodes auth '_pipeline' => 'affiche_formulaire_login', // faire passer le formulaire dans un pipe dedie pour les methodes auth
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter