From 50c091946cd142b1e4f70d6b9b27495be3077a69 Mon Sep 17 00:00:00 2001 From: Kevin Locke Date: Sat, 6 Jun 2015 21:14:11 -0600 Subject: [PATCH] Make data type conversion case-insensitive Data types are not case-sensitive, and the current data type conversion assumes that the types are all lower-case. Although this is currently the case for most (all?) of the Wordpress core, it is not the case for all extensions (e.g. nextgen-gallery). Make data type conversion case-insensitive. Signed-off-by: Kevin Locke --- pg4wp/driver_pgsql_install.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pg4wp/driver_pgsql_install.php b/pg4wp/driver_pgsql_install.php index 7f53687..55ac875 100644 --- a/pg4wp/driver_pgsql_install.php +++ b/pg4wp/driver_pgsql_install.php @@ -129,7 +129,7 @@ WHERE '.$where : '').';'; $table = $matches[1]; $col = $matches[2]; $newname = $matches[3]; - $type = $matches[4]; + $type = strtolower($matches[4]); if( isset($GLOBALS['pg4wp_ttr'][$type])) $type = $GLOBALS['pg4wp_ttr'][$type]; $unsigned = $matches[5]; @@ -159,7 +159,7 @@ WHERE '.$where : '').';'; { $table = $matches[1]; $col = $matches[2]; - $type = $matches[3]; + $type = strtolower($matches[3]); if( isset($GLOBALS['pg4wp_ttr'][$type])) $type = $GLOBALS['pg4wp_ttr'][$type]; $unsigned = $matches[4];