From 8632507d0f9c578e62999a8c1b3f3f8db95a9145 Mon Sep 17 00:00:00 2001
From: b_b <bruno@eliaz.fr>
Date: Tue, 21 May 2019 15:54:30 +0200
Subject: [PATCH] =?UTF-8?q?Fix=20#4335=20:=20recuperer=5Furl=20ne=20doit?=
 =?UTF-8?q?=20pas=20renvoyer=20un=20status=20200=20quand=20=C3=A7a=20n'est?=
 =?UTF-8?q?=20pas=20le=20cas?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/inc/distant.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ecrire/inc/distant.php b/ecrire/inc/distant.php
index ad7966be0d..122e580f35 100644
--- a/ecrire/inc/distant.php
+++ b/ecrire/inc/distant.php
@@ -544,7 +544,9 @@ function recuperer_url($url, $options = array()) {
 			$result['page'] = &$res;
 			$result['length'] = strlen($result['page']);
 		}
-		$result['status'] = 200; // on a reussi, donc !
+		if (!$result['status']) {
+			$result['status'] = 200; // on a reussi, donc !
+		}
 	}
 	if (!$result['page']) {
 		return $result;
-- 
GitLab