[Mapbender-commits] r9961 - trunk/mapbender/http/php/wrappers
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Sep 12 22:24:17 PDT 2018
Author: armin11
Date: 2018-09-12 22:24:16 -0700 (Wed, 12 Sep 2018)
New Revision: 9961
Modified:
trunk/mapbender/http/php/wrappers/mbw_split.php
Log:
Rewind
Modified: trunk/mapbender/http/php/wrappers/mbw_split.php
===================================================================
--- trunk/mapbender/http/php/wrappers/mbw_split.php 2018-09-13 05:15:31 UTC (rev 9960)
+++ trunk/mapbender/http/php/wrappers/mbw_split.php 2018-09-13 05:24:16 UTC (rev 9961)
@@ -31,10 +31,23 @@
$result = null;
if (strpos($phpversion, "5.") === 0) {
- $result = split($pars);
+ switch ($phpversion[2]) {
+ case "0":
+ case "1":
+ case "2":
+ $result = split($pars);
+ break;
+ default:
+ if (isset($pars[2]) && $pars[2] <= 0) {
+ $result = explode($pars[0],$pars[1]);
+ }
+ else {
+ $result = explode($pars[0],$pars[1],$pars[2]);
+ }
+ }
}
else if (strpos($phpversion, "7.") === 0) {
- if ($pars[2] == NULL) {
+ if (isset($pars[2]) && $pars[2] <= 0) {
$result = explode($pars[0],$pars[1]);
}
else {
More information about the Mapbender_commits
mailing list