This repository was archived by the owner on Nov 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
system/modules/core/controllers Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -81,12 +81,15 @@ public function run()
8181 $ objDca ->field = $ strField ;
8282
8383 // Set the active record
84- $ strModel = \Model::getClassFromTable ($ strTable );
85- $ objModel = $ strModel ::findByPk (\Input::get ('id ' ));
86-
87- if ($ objModel !== null )
84+ if ($ this ->Database ->tableExists ($ strTable ))
8885 {
89- $ objDca ->activeRecord = $ objModel ;
86+ $ strModel = \Model::getClassFromTable ($ strTable );
87+ $ objModel = $ strModel ::findByPk (\Input::get ('id ' ));
88+
89+ if ($ objModel !== null )
90+ {
91+ $ objDca ->activeRecord = $ objModel ;
92+ }
9093 }
9194
9295 // AJAX request
Original file line number Diff line number Diff line change @@ -81,12 +81,15 @@ public function run()
8181 $ objDca ->field = $ strField ;
8282
8383 // Set the active record
84- $ strModel = \Model::getClassFromTable ($ strTable );
85- $ objModel = $ strModel ::findByPk (\Input::get ('id ' ));
86-
87- if ($ objModel !== null )
84+ if ($ this ->Database ->tableExists ($ strTable ))
8885 {
89- $ objDca ->activeRecord = $ objModel ;
86+ $ strModel = \Model::getClassFromTable ($ strTable );
87+ $ objModel = $ strModel ::findByPk (\Input::get ('id ' ));
88+
89+ if ($ objModel !== null )
90+ {
91+ $ objDca ->activeRecord = $ objModel ;
92+ }
9093 }
9194
9295 // AJAX request
You can’t perform that action at this time.
0 commit comments