|
@@ -9,10 +9,18 @@ class App
|
|
|
{
|
|
|
if ($class && empty($this->class)) {
|
|
|
if (strpos($class, '/')) {
|
|
|
- [$this->app, $this->name] = explode('/', $class, 2);
|
|
|
+ $temp = explode('/', $class, 2);
|
|
|
+ if (empty($temp[1])) {
|
|
|
+ Dever::error($class . ' error');
|
|
|
+ }
|
|
|
+ [$this->app, $this->name] = $temp;
|
|
|
$class = strtr($class, '/', '\\');
|
|
|
} else {
|
|
|
- [$this->app, $this->name] = explode('\\', $class, 2);
|
|
|
+ $temp = explode('\\', $class, 2);
|
|
|
+ if (empty($temp[1])) {
|
|
|
+ Dever::error($class . ' error');
|
|
|
+ }
|
|
|
+ [$this->app, $this->name] = $temp;
|
|
|
$this->name = strtr($this->name, '\\', '/');
|
|
|
}
|
|
|
$project = Dever::project($this->app);
|