[ccan] [PATCH 3/3] staticmoduleinfo: Replace deprecated split() with explode()

Andrew Jeffery andrew at aj.id.au
Sat Mar 26 00:12:14 AEDT 2016


split() was deprecated in PHP5 and was removed in PHP7[1]. An
alternative function is explode(), which was introduced in PHP4[1].
So given we previously had a hard dependency on the php5 binary, switch
to explode().

[1] https://secure.php.net/manual/en/function.split.php
[2] https://secure.php.net/manual/en/function.explode.php

Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
---
 web/staticmoduleinfo.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/staticmoduleinfo.php b/web/staticmoduleinfo.php
index 7f388c2..ac4ac68 100644
--- a/web/staticmoduleinfo.php
+++ b/web/staticmoduleinfo.php
@@ -63,7 +63,7 @@ if ($extdepends) {
 <h3>External dependencies:</h3>
 <ul class='external-dependencies'>
 <?php
-	foreach (split("\n", $extdepends) as $dep) {
+	foreach (explode("\n", $extdepends) as $dep) {
 		$fields=preg_split("/\s+/", $dep);
 		echo "<li>" . $fields[0].' ';
 		if (count($fields) > 1)
-- 
2.7.3



More information about the ccan mailing list