summaryrefslogtreecommitdiff
path: root/includes/model/UserDriverLicenses_model.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-07-23 11:46:54 +0200
committermsquare <msquare@notrademark.de>2017-07-23 11:46:54 +0200
commita157004f4aefaa5e2265f852f9432becedee1d66 (patch)
treec47915a311371afa7aa962655fd5ff1ff2ab5e64 /includes/model/UserDriverLicenses_model.php
parent36446dd644ff865d1d63aab0ba4c670ce2b277d1 (diff)
handle failed db queries in Db class
Diffstat (limited to 'includes/model/UserDriverLicenses_model.php')
-rw-r--r--includes/model/UserDriverLicenses_model.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/includes/model/UserDriverLicenses_model.php b/includes/model/UserDriverLicenses_model.php
index 525d2016..ee93ac95 100644
--- a/includes/model/UserDriverLicenses_model.php
+++ b/includes/model/UserDriverLicenses_model.php
@@ -94,9 +94,6 @@ function UserDriverLicenses_create($user_driver_license, $user)
(bool)$user_driver_license['has_license_forklift'],
]
);
- if (DB::getStm()->errorCode() != '00000') {
- engelsystem_error('Unable to create user driver license');
- }
return $user_driver_license;
}
@@ -105,11 +102,10 @@ function UserDriverLicenses_create($user_driver_license, $user)
* Update a user's driver license entry
*
* @param array $user_driver_license The UserDriverLicense to update
- * @return bool
*/
function UserDriverLicenses_update($user_driver_license)
{
- $result = DB::update('
+ DB::update('
UPDATE `UserDriverLicenses`
SET
`has_car`=?,
@@ -130,10 +126,6 @@ function UserDriverLicenses_update($user_driver_license)
$user_driver_license['user_id'],
]
);
- if (DB::getStm()->errorCode() != '00000') {
- engelsystem_error('Unable to update user driver license information');
- }
- return $result;
}
/**