[debian-edu-commits] debian-edu/ 02/05: debian/patches: Add 1002_php7-compat.patch. Use preg_split() instead of split(). Thanks to Wolfgang Schweer for providing that patch (via #821659).

Mike Gabriel sunweaver at debian.org
Fri May 27 14:20:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository slbackup-php.

commit ec46882e447b9afe15131c9e448abd3d4c0d0ddf
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri May 27 16:08:39 2016 +0200

    debian/patches: Add 1002_php7-compat.patch. Use preg_split() instead of split(). Thanks to Wolfgang Schweer for providing that patch (via #821659).
---
 debian/patches/1002_php7-compat.patch | 30 ++++++++++++++++++++++++++++++
 debian/patches/series                 |  1 +
 2 files changed, 31 insertions(+)

diff --git a/debian/patches/1002_php7-compat.patch b/debian/patches/1002_php7-compat.patch
new file mode 100644
index 0000000..3e63a2c
--- /dev/null
+++ b/debian/patches/1002_php7-compat.patch
@@ -0,0 +1,30 @@
+Description: Make slbackup-php PHP7 compatible (use preg_split instead of split)
+Author: Wolfgang Schweer <wschweer at arcor.de>
+
+--- a/src/functions.php
++++ b/src/functions.php
+@@ -75,7 +75,7 @@
+ 	$lang_accept = array () ; 
+ 	$lang_accept = explode (",", $_SERVER['HTTP_ACCEPT_LANGUAGE']); 
+ 	for ($i = 0 ; $i < count ($lang_accept) ; $i++ ) {
+-	    $lang_accept[$i] = split(";", $lang_accept[$i]) ; 
++	    $lang_accept[$i] = preg_split(';', $lang_accept[$i]) ; 
+ 	    $lang_accept[$i] = $lang_accept[$i][0] ; 
+ 	}
+ 
+@@ -101,13 +101,13 @@
+ 	$locales = array();
+ 	$locales_utf8 = array();
+ 	if (isset($found_locale) && !empty($lang_accept[0])) {
+-	    $found_locale_tuple = split('_', $found_locale);
++	    $found_locale_tuple = preg_split('_', $found_locale);
+ 	    if (count($found_locale_tuple) > 1) {
+ 		$locales[] = $found_locale;
+ 		$locales_utf8[] = $found_locale.'.UTF-8';
+ 	    }
+ 	    foreach ($lang_accept as $lang) {
+-		$lang_tuple = split('-',$lang);
++		$lang_tuple = preg_split('-',$lang);
+ 		if (count($lang_tuple) > 1) {
+ 		    $language = strtolower($lang_tuple[0]);
+ 		    $country = strtoupper($lang_tuple[1]);
diff --git a/debian/patches/series b/debian/patches/series
index 8c7d507..83ba2b5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 1001_adapt-to-apache24.patch
+1002_php7-compat.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/slbackup-php.git



More information about the debian-edu-commits mailing list