Switched to using shorter ActionErrors functions
[timetracker.git] / expenses.php
index 0f93b3b..15ccad5 100644 (file)
@@ -166,7 +166,7 @@ if ($request->getMethod() == 'POST') {
       $errors->add($i18n->getKey('error.period_locked'));
 
     // Insert record.
-    if ($errors->isEmpty()) {
+    if ($errors->no()) {
       if (ttExpenseHelper::insert(array('date'=>$cl_date,'user_id'=>$user->getActiveUser(),
         'client_id'=>$cl_client,'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost,'status'=>1))) {
         header('Location: expenses.php');