mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02:00
issue #2341 fatal error on first call to send_piwigo_infos()
This commit is contained in:
@@ -1409,7 +1409,7 @@ SELECT '.$conf['user_fields']['email'].'
|
|||||||
* @param string $condition SQL condition
|
* @param string $condition SQL condition
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function load_conf_from_db($condition = '')
|
function load_conf_from_db($condition = '', $die_on_condition_with_no_result=true)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@@ -1420,7 +1420,7 @@ SELECT param, value
|
|||||||
;';
|
;';
|
||||||
$result = pwg_query($query);
|
$result = pwg_query($query);
|
||||||
|
|
||||||
if ((pwg_db_num_rows($result) == 0) and !empty($condition))
|
if ((pwg_db_num_rows($result) == 0) and !empty($condition) and $die_on_condition_with_no_result)
|
||||||
{
|
{
|
||||||
fatal_error('No configuration data');
|
fatal_error('No configuration data');
|
||||||
}
|
}
|
||||||
@@ -2447,7 +2447,7 @@ function send_piwigo_infos()
|
|||||||
// $conf['send_piwigo_infos_last_notice'] has been loaded in include/common, maybe
|
// $conf['send_piwigo_infos_last_notice'] has been loaded in include/common, maybe
|
||||||
// a few seconds earlier, we need a refreshed value from the database. Another
|
// a few seconds earlier, we need a refreshed value from the database. Another
|
||||||
// concurrent execution might have already performed send_piwigo_infos 3 seconds ago.
|
// concurrent execution might have already performed send_piwigo_infos 3 seconds ago.
|
||||||
load_conf_from_db('param = "send_piwigo_infos_last_notice"');
|
load_conf_from_db('param = "send_piwigo_infos_last_notice"', false);
|
||||||
|
|
||||||
$do_send = false;
|
$do_send = false;
|
||||||
if (isset($conf['send_piwigo_infos_last_notice']))
|
if (isset($conf['send_piwigo_infos_last_notice']))
|
||||||
|
|||||||
Reference in New Issue
Block a user