CCAN Archive mirror
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@aj.id.au>
To: ccan@lists.ozlabs.org
Subject: [PATCH 3/3] staticmoduleinfo: Replace deprecated split() with explode()
Date: Fri, 25 Mar 2016 23:42:14 +1030	[thread overview]
Message-ID: <1458911534-8822-4-git-send-email-andrew@aj.id.au> (raw)
In-Reply-To: <1458911534-8822-1-git-send-email-andrew@aj.id.au>

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@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

_______________________________________________
ccan mailing list
ccan@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/ccan

      parent reply	other threads:[~2016-03-25 13:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-25 13:12 [PATCH 0/3] Misc fixes for webpages target Andrew Jeffery
2016-03-25 13:12 ` [PATCH 1/3] Makefile-ccan: Add cppmagic to MODS_NO_SRC Andrew Jeffery
2016-03-25 13:12 ` [PATCH 2/3] Makefile-web: Introduce variable for PHP binary Andrew Jeffery
2016-03-25 13:12 ` Andrew Jeffery [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458911534-8822-4-git-send-email-andrew@aj.id.au \
    --to=andrew@aj.id.au \
    --cc=ccan@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).