mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-28 20:29:58 +03:00
issue #2341 fatal error on first call to send_piwigo_infos()
This commit is contained in:
parent
43afd60d00
commit
d5431e9476
1 changed files with 3 additions and 3 deletions
|
@ -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']))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue