diff --git a/ecrire/inc/presentation.php b/ecrire/inc/presentation.php
index de0ed989b2e33ea4e7a545f9cb8eb618da5802d2..62409bc6a64629fba5999728d0a1ba4168b98c23 100644
--- a/ecrire/inc/presentation.php
+++ b/ecrire/inc/presentation.php
@@ -1338,7 +1338,7 @@ function debut_javascript($admin, $stat)
 	// envoi le fichier JS de config si browser ok.
 		$GLOBALS['browser_layer'] .
 	 	http_script(
-			(isset($_COOKIE['spip_accepte_ajax']) >= 1
+			((isset($_COOKIE['spip_accepte_ajax']) && $_COOKIE['spip_accepte_ajax'] >= 1)
 			? ''
 			: "$.ajax('GET', '$testeur')") .
 			"\nvar ajax_image_searching = \n'<div style=\"float: ".$GLOBALS['spip_lang_right'].";\"><img src=\"".url_absolue(_DIR_IMG_PACK."searching.gif")."\" alt=\"\" /></div>';" .