mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Infolog: Avoid JS error 'Uncaught TypeError: Cannot read properties of undefined (reading 'getWidgetById')' caused by sending invalid pl_id
Fixed by not sending invalid pl_id which triggered fix_bad_value()
This commit is contained in:
parent
48eb9c1968
commit
ab32872988
@ -578,6 +578,11 @@ class infolog_so
|
||||
$to_write[$key] = $this->data[$key] = $val; // update internal data
|
||||
}
|
||||
}
|
||||
// If no price list use NULL not 0
|
||||
if($to_write['pl_id'] == '')
|
||||
{
|
||||
$to_write['pl_id'] = NULL;
|
||||
}
|
||||
// writing no price as SQL NULL (required by postgres)
|
||||
if ($to_write['info_price'] === '') $to_write['info_price'] = NULL;
|
||||
|
||||
|
@ -2222,6 +2222,11 @@ class infolog_ui
|
||||
{
|
||||
unset($content['info_cat']);
|
||||
}
|
||||
// Don't send '0' if there is no price list
|
||||
if($content['pl_id'] == '0')
|
||||
{
|
||||
unset($content['pl_id']);
|
||||
}
|
||||
$content['duration_format'] = $this->duration_format;
|
||||
$content['hours_per_workday'] = $this->hours_per_workday;
|
||||
if ($this->prefs['show_id']) $content['info_number'] = $info_id;
|
||||
|
Loading…
Reference in New Issue
Block a user