@@ -150,7 +150,12 @@ public function start(): self
150150 $ results = $ object ->{$ method }();
151151
152152 // Check if the results is an array
153- if (is_array ($ results ) && is_array ($ results ['data ' ])){
153+ if (is_array ($ results ) && !empty ($ results ['data ' ])){
154+
155+ // Ensure data is an array
156+ if (!is_array ($ results ['data ' ])){
157+ $ results ['data ' ] = [$ results ['data ' ]];
158+ }
154159
155160 // Append the list of extensions(plugins) to the results
156161 $ results ['data ' ]['extensions ' ] = array_values (array_diff (scandir ($ this ->Config ->root () . "/lib/plugins " ), ['.. ' , '. ' ,'.DS_Store ' ]));
@@ -159,8 +164,13 @@ public function start(): self
159164 $ results ['data ' ]['auth ' ] = [
160165 'authenticated ' => $ this ->Auth ->isAuthenticated (),
161166 'public ' => $ this ->Config ->get ('application ' ,'public ' ),
167+ ];
168+
169+ // Append Auth Information to the results
170+ $ results ['data ' ]['app ' ] = [
162171 'maintenance ' => $ this ->Config ->get ('application ' ,'maintenance ' ),
163172 'development ' => $ this ->Config ->get ('application ' ,'development ' ),
173+ 'logLevel ' => $ this ->Config ->get ('log ' ,'level ' ),
164174 ];
165175
166176 // Append Auth User Information to the results
0 commit comments