File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/Vectorface/SnappyRouter Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ public function handleCliRoute($pathComponents)
127
127
*
128
128
* @param bool $isCli True for CLI handlers, false otherwise.
129
129
* @param array $handlerParams An array parameters required by the handler.
130
- * @return AbstractHandler Returns the handler to be used for the route.
130
+ * @return string Returns the result of the route.
131
131
*/
132
132
private function invokeHandler ($ isCli , $ handlerParams )
133
133
{
@@ -232,7 +232,7 @@ private function parseConfig()
232
232
{
233
233
// setup the DI layer
234
234
$ diClass = $ this ->config ->get (Config::KEY_DI );
235
- if (class_exists ($ diClass )) {
235
+ if ($ diClass && class_exists ($ diClass )) {
236
236
$ di = new $ diClass ();
237
237
if ($ di instanceof DiInterface) {
238
238
Di::setDefault ($ di );
@@ -263,9 +263,9 @@ private function setupHandlers($handlers)
263
263
$ handlerClass = $ handlerDetails [Config::KEY_CLASS ];
264
264
}
265
265
266
- if (!class_exists ($ handlerClass )) {
266
+ if ($ handlerClass && !class_exists ($ handlerClass )) {
267
267
throw new Exception (
268
- ' Cannot instantiate instance of ' . $ handlerClass
268
+ " Cannot instantiate instance of $ handlerClass"
269
269
);
270
270
}
271
271
$ this ->handlers [] = new $ handlerClass ($ options );
You can’t perform that action at this time.
0 commit comments