Hello All,
I've been doing some coding with regard to Piwigo and have found a few bugs. Some got squashed with the full 2.9 release, others not. I'll post them here for reference sake. The higher ups can determine if it is worth addressing.
Bug 1:
functions_user.inc.php (line 715): Unquoted field generates database error
WHERE user_id = '.$conf['default_user_id'].'
should be:
WHERE user_id = \''.$conf['default_user_id'].'\'
Piwigo version: 2.9
PHP version: 7.1
MySQL version: 5.5
Last edited by digibirdtrek (2017-05-12 15:35:23)
Offline
Hi digibirdtrek,
Do you use an external table to list your users? Because in Piwigo, user_id is an integer value and $conf['default_user_id'] is also one. It should not be a problem not to quote this value for the SQL query.
Offline
plg wrote:
Hi digibirdtrek,
Do you use an external table to list your users? Because in Piwigo, user_id is an integer value and $conf['default_user_id'] is also one. It should not be a problem not to quote this value for the SQL query.
Not using an external table, but am using a different DB manager. The error generated was a result of mysqli looking for a column of that name (default user name), instead of a value in the condition.
Worth noting, I was working with a 2.9 RC2 install. I checked the defaults and it is an integer. Trying to find where it got switch to a string as I have not directly modified that value.
Last edited by digibirdtrek (2017-05-12 16:30:16)
Offline
digibirdtrek wrote:
[...] am using a different DB manager
?!? you're not using MySQL? Piwigo is only compatible with MySQL!
Offline
plg wrote:
digibirdtrek wrote:
[...] am using a different DB manager
?!? you're not using MySQL? Piwigo is only compatible with MySQL!
Not a different database vendor/driver, different manager, specifically ADOdb. This allows me to connect to multiple databases at the same time within Piwigo. I wrote a bridge between AODdb and Piwigo, among other on going efforts.
I found the problem and it was on my end. The default_user_id in the config_default.inc.php was a string. I converted the file to an array. When running the batch the default_user_id got set to 'guest_id' because it was using the value of guest_id.
Last edited by digibirdtrek (2017-05-12 16:54:43)
Offline