mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 21:32:51 +09:00
Update more modules to throw exceptions
This commit is contained in:
parent
c1cbc5dbdb
commit
be1ce69073
21 changed files with 142 additions and 116 deletions
|
|
@ -492,11 +492,11 @@ class editorModel extends editor
|
|||
// Create an object of the component and execute
|
||||
$class_path = sprintf('%scomponents/%s/', $this->module_path, $component);
|
||||
$class_file = sprintf('%s%s.class.php', $class_path, $component);
|
||||
if(!file_exists($class_file)) return $this->setError('msg_component_is_not_founded', $component);
|
||||
if(!file_exists($class_file)) return new BaseObject(-1, 'msg_component_is_not_founded', $component);
|
||||
// Create an object after loading the class file
|
||||
require_once($class_file);
|
||||
$oComponent = new $component($editor_sequence, $class_path);
|
||||
if(!$oComponent) return $this->setError('msg_component_is_not_founded', $component);
|
||||
if(!$oComponent) return new BaseObject(-1, 'msg_component_is_not_founded', $component);
|
||||
// Add configuration information
|
||||
$component_info = $this->getComponent($component, $site_srl);
|
||||
$oComponent->setInfo($component_info);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue