[SPIP] ~maj v3.2.9-->v3.2.11
[lhc/web/www.git] / www / ecrire / public / assembler.php
index bbe6ba0..8fc3f7a 100644 (file)
@@ -537,11 +537,10 @@ function inclure_modele($type, $id, $params, $lien, $connect = '', $env = array(
 
        $params = array_filter(explode('|', $params));
        if ($params) {
-               list(, $soustype) = each($params);
+               $soustype = current($params);
                $soustype = strtolower(trim($soustype));
-               if (in_array($soustype,
-                       array('left', 'right', 'center', 'ajax'))) {
-                       list(, $soustype) = each($params);
+               if (in_array($soustype, array('left', 'right', 'center', 'ajax'))) {
+                       $soustype = next($params);
                        $soustype = strtolower($soustype);
                }