This repository was archived by the owner on Nov 3, 2023. It is now read-only.
File tree 2 files changed +16
-10
lines changed
system/modules/core/controllers
2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -81,12 +81,15 @@ public function run()
81
81
$ objDca ->field = $ strField ;
82
82
83
83
// 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 ))
88
85
{
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
+ }
90
93
}
91
94
92
95
// AJAX request
Original file line number Diff line number Diff line change @@ -81,12 +81,15 @@ public function run()
81
81
$ objDca ->field = $ strField ;
82
82
83
83
// 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 ))
88
85
{
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
+ }
90
93
}
91
94
92
95
// AJAX request
You can’t perform that action at this time.
0 commit comments