Yes, obscure type of bug.
Had the same one after migrating a website.
Old site (MaxiGallery working well):
Hosting: Yellis.net
PHP 5.3.29
MySQL 5.5.47
MODx 1.0.3
magic_quotes_gpc Off
magic_quote_runtime Off
New site:
Hosting: Infomaniak.website (URL for site preview)
PHP 5.6.22
MySQL 5.0.11-dev
MODX 1.1
magic_quotes_gpc ?(status not mentioned by phpinfo.php)
magic_quote_runtime ?(status not mentioned by phpinfo.php)
By echoing $mg->pics_tbl, I observed that the table name doesn't have back quotes around it.
When trying
$query=mysql_query("$modx->db->query"); as SimonMW did, this error was returned
"Error : Object of class DBAPI could not be converted to string"
I verified the table in phpMyAdmin and it had no defect.
Solved the issue by simply commenting out the whole "validate table" block in maxigallery.php:
//validate gallery table
/*
$query=mysql_query("DESC $mg->pics_tbl");
if(!$query) {
...
} else {
...
}
*/
Works. But of course, a patch would be appreciated.
Maybe does the error come from MySQL as I see Infomaniak is using an older "dev" MySQL client for preview URLs, or some server settings.