From 33740e34e5fcc49ee791f05b1568aa33c5831f60 Mon Sep 17 00:00:00 2001 From: Kevin Locke Date: Tue, 22 Sep 2015 08:40:02 -0700 Subject: [PATCH] Replace split() with explode() for PHP 7 It appears that the split function, which has been deprecated since PHP 5.3.0, has finally been removed in PHP 7. Since it is being used to split on a literal string, use explode() instead. Fixes #1 Signed-off-by: Kevin Locke --- pg4wp/driver_pgsql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pg4wp/driver_pgsql.php b/pg4wp/driver_pgsql.php index 12dbf96..bc67d5e 100644 --- a/pg4wp/driver_pgsql.php +++ b/pg4wp/driver_pgsql.php @@ -525,7 +525,7 @@ $pattern = '/INSERT INTO (\w+)\s+\([ a-zA-Z_"]+/'; preg_match($pattern, $sql, $matches); $GLOBALS['pg4wp_ins_table'] = $matches[1]; - $match_list = split(' ', $matches[0]); + $match_list = explode(' ', $matches[0]); if( $GLOBALS['pg4wp_ins_table']) { $GLOBALS['pg4wp_ins_field'] = trim($match_list[3],' () ');