diff --git a/ecrire/inc/filtres.php b/ecrire/inc/filtres.php index 2867d9f6ef781bb29240bdd184211415c045814b..905799f5ef41c65b197a0b581ceac85c10af6bdd 100644 --- a/ecrire/inc/filtres.php +++ b/ecrire/inc/filtres.php @@ -2083,29 +2083,6 @@ function compacte($source, $format = null) { } -// clone de http://php.net/var_export compatible < 4.2.0 et sans ob_xx -// http://doc.spip.org/@spip_var_export -function spip_var_export($s) { - if (is_array($s)) { - foreach ($s as $k=>$v) - $s[$k] = spip_var_export($k) . ' => ' . spip_var_export($v); - return 'array(' . join(',',$s).')'; - } - - return is_null($s) - ? 'null' - : (is_bool($s) - ? ($s ? 'true' : 'false') - : (is_numeric($s) - ? "$s" - : (is_string($s) - ? "'".addslashes($s)."'" - : "'".gettype($s)."'" - ) - ) - ); -} - // produit une balise img avec un champ alt d'office si vide // attention le htmlentities et la traduction doivent etre appliques avant. diff --git a/ecrire/public/compiler.php b/ecrire/public/compiler.php index 700af9cd60f34cd8e8d0f248be69c21c0b68abc4..593d51458eae9b0d451780a0951e047f78c03bd8 100644 --- a/ecrire/public/compiler.php +++ b/ecrire/public/compiler.php @@ -93,7 +93,7 @@ function calculer_inclure($struct, $descr, &$boucles, $id_boucle) { } $contexte = 'array(' . join(",\n\t", $_contexte) .')'; if ($env) { - $contexte = "array_merge('.spip_var_export(\$Pile[0]).',$contexte)"; + $contexte = "array_merge('.var_export(\$Pile[0],1).',$contexte)"; } return "\n'<".