From 1cd588dc650c1c41f720e87628fe33668354dacf Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 6 Dec 2023 16:23:10 +0800 Subject: [PATCH] * Fix bug #41114. --- module/execution/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 2f36d96eec..295526e6fb 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1243,8 +1243,8 @@ class executionModel extends model { $this->app->loadLang('programplan'); $parent = $this->getByID($parentID); - if($begin < $parent->begin) dao::$errors['begin'] = sprintf($this->lang->programplan->error->letterParent, $parent->begin); - if($end > $parent->end) dao::$errors['end'] = sprintf($this->lang->programplan->error->greaterParent, $parent->end); + if($parent && $begin < $parent->begin) dao::$errors['begin'] = sprintf($this->lang->programplan->error->letterParent, $parent->begin); + if($parent && $end > $parent->end) dao::$errors['end'] = sprintf($this->lang->programplan->error->greaterParent, $parent->end); } }