diff --git a/api/src/Db/Backup.php b/api/src/Db/Backup.php index e84e12484c..18ff21fb11 100644 --- a/api/src/Db/Backup.php +++ b/api/src/Db/Backup.php @@ -765,7 +765,10 @@ class Backup // decode bool columns, they might be 't'/'f' for old PostgreSQL backups foreach($bools as $key) { - $fields[$key] = Api\Db::from_bool($fields[$key]); + if (isset($fields[$key])) // do NOT replace NULL with false/0 + { + $fields[$key] = Api\Db::from_bool($fields[$key]); + } } } return $fields; @@ -797,7 +800,7 @@ class Backup { $arr[$key] = base64_decode($field); } - elseif (in_array($key, $bools)) + elseif ($field !== 'NULL' && in_array($key, $bools)) { $arr[$key] = Api\Db::from_bool($field); } diff --git a/infolog/setup/setup.inc.php b/infolog/setup/setup.inc.php index d3e2278508..fe75692d8b 100644 --- a/infolog/setup/setup.inc.php +++ b/infolog/setup/setup.inc.php @@ -11,7 +11,7 @@ */ $setup_info['infolog']['name'] = 'infolog'; -$setup_info['infolog']['version'] = '19.1'; +$setup_info['infolog']['version'] = '19.1.001'; $setup_info['infolog']['app_order'] = 5; $setup_info['infolog']['tables'] = array('egw_infolog','egw_infolog_extra','egw_infolog_users'); $setup_info['infolog']['enable'] = 1; diff --git a/infolog/setup/tables_update.inc.php b/infolog/setup/tables_update.inc.php index 08257d812a..3561b75a0f 100644 --- a/infolog/setup/tables_update.inc.php +++ b/infolog/setup/tables_update.inc.php @@ -1108,3 +1108,16 @@ function infolog_upgrade17_1_001() { return $GLOBALS['setup_info']['infolog']['currentver'] = '19.1'; } + +/** + * Fix egw_infolog_users.info_res_deleted=0 --> NULL + * + * @return string + */ +function infolog_upgrade19_1() +{ + $GLOBALS['egw_setup']->db->query("UPDATE egw_infolog_users SET info_res_deleted=NULL WHERE info_res_deleted=". + $GLOBALS['egw_setup']->db->quote(false, 'bool')); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '19.1.001'; +}