diff --git a/ecrire/inc/autoriser.php b/ecrire/inc/autoriser.php
index 57604070f6f4d6a9145cd44f1f2b9be145b8d012..1fa6240ca5bfff7328db8fc0ea55c850ff969175 100644
--- a/ecrire/inc/autoriser.php
+++ b/ecrire/inc/autoriser.php
@@ -228,6 +228,11 @@ function autoriser_dist(string $faire, ?string $type = '', $id = null, $qui = nu
 		'autoriser' . _LOG_DEBUG
 	);
 
+	if (!is_bool($a)) {
+	     trigger_error(sprintf("Function %s should returns a boolean instead of %s (casts as boolean). This will trigger fatal error in future versions.", $f, gettype($a)), \E_USER_DEPRECATED);
+	     $a = (bool) $a;
+	}
+
 	return $a;
 }