From 6453acd5ff173a0249d088e9b3b58fa8feddeffa Mon Sep 17 00:00:00 2001
From: Andreas Gohr <gohr@cosmocode.de>
Date: Wed, 1 Mar 2017 10:32:08 +0100
Subject: [PATCH] skip empty line when reading jQuery versions. fixes #1886

---
 inc/confutils.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/inc/confutils.php b/inc/confutils.php
index 6948b6e31..e3d2bf994 100644
--- a/inc/confutils.php
+++ b/inc/confutils.php
@@ -132,7 +132,8 @@ function getCdnUrls() {
     $versions = array();
     $lines = file(DOKU_INC . 'lib/scripts/jquery/versions');
     foreach($lines as $line) {
-        $line = preg_replace('/#.*$/', '', $line);
+        $line = trim(preg_replace('/#.*$/', '', $line));
+        if($line === '') continue;
         list($key, $val) = explode('=', $line, 2);
         $key = trim($key);
         $val = trim($val);
-- 
GitLab