Closed A2-Dev closed 4 years ago
SqlBuddy Reviewed Version : 2016 Carlos MartÃn Arnillas Confirm Non Function, if I try to run a query / statement. PHP v.7.2.7 There was an error receiving data from the server PHP v.7.1.19 Fatal error: Uncaught Error: [] operator not supported for strings in /home/jacobch/www/bigmax_ch/shop/admin/sqlbuddy/functions.php:469 Stack trace: #0 /home/jacobch/www/bigmax_ch/shop/admin/sqlbuddy/browse.php(31): splitQueryText('DELETE FROM `oc...') #1 {main} thrown in /home/jacobch/www/bigmax_ch/shop/admin/sqlbuddy/functions.php on line 469 PHP v.7.0.30 All works well ! You are connected to MySQL 5.5.5 with the user ......... mysql.db.internal. PHP Version: 7.0.30 Ernie
// $tables = "";
$tables = array();
if ($conn->isResultSet($tableSql)) {
while ($tableRow = $conn->fetchArray($tableSql)) {
$tables[] = $tableRow[0];
}
}
}
Thank you for the fork, i was irritated at the thought of skinning adminer when i found sqlbuddy. It could still be prettier but it's way better. My heart dropped when i saw a mysql_connect error. Luckily i found your code. You saved the day, for me at least. ;)
According to google this is a php 7 issue but i'm not quite sure how no one else has run into this issue. Info and fix below.
_gimpy@GimpyDevil ~/publichtml/fukpma $ uname -a && apachectl -v && php -v && mysql -V FreeBSD GimpyDevil 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017 amd64 Server version: Apache/2.4.33 (FreeBSD) PHP 7.2.6 (cli) (built: Jun 23 2018 01:23:24) ( NTS ) mysql Ver 14.14 Distrib 5.7.22, for FreeBSD11.1 (amd64)
Issue is from functions.php and occurs when i tried to run a sql statment.
block:
function splitQueryText($query)
specific line is:$querySplit = "";
Changing it to the following will fix it:$querySplit = array();