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 <kevin@kevinlocke.name>
This commit is contained in:
Kevin Locke
2015-09-22 08:40:02 -07:00
parent 2ab93ef3a4
commit 33740e34e5

View File

@ -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],' () ');