( ! ) Fatal error: Call to a member function toArray() on null in /var/www/html/currentaffairs/src/Controller/PagesController.php on line 471
Call Stack
#TimeMemoryFunctionLocation
10.0001233424{main}( ).../index.php:0
20.0016647608Cake\Http\Server->run( ).../index.php:40
30.00721913176Cake\Http\Runner->run( ).../Server.php:81
40.00721913288Cake\Http\Runner->__invoke( ).../Runner.php:51
50.00741928376Cake\Error\Middleware\ErrorHandlerMiddleware->__invoke( ).../Runner.php:65
60.00741928376Cake\Http\Runner->__invoke( ).../ErrorHandlerMiddleware.php:98
70.00741934384Cake\Routing\Middleware\AssetMiddleware->__invoke( ).../Runner.php:65
80.00751934416Cake\Http\Runner->__invoke( ).../AssetMiddleware.php:88
90.00751934752Cake\Routing\Middleware\RoutingMiddleware->__invoke( ).../Runner.php:65
100.00872037456Cake\Http\Runner->__invoke( ).../RoutingMiddleware.php:104
110.00872037592Cake\Http\BaseApplication->__invoke( ).../Runner.php:65
120.00882049432Cake\Http\ActionDispatcher->dispatch( ).../BaseApplication.php:108
130.01012242584Cake\Http\ActionDispatcher->_invoke( ).../ActionDispatcher.php:93
140.01022243104Cake\Controller\Controller->invokeAction( ).../ActionDispatcher.php:119
150.01032244280App\Controller\PagesController->subjectwise( ).../Controller.php:440
Error: Call to a member function toArray() on null

Call to a member function toArray() on null Cake\Error\FatalErrorException

Documentation API

Could this be caused by using Auto-Tables?

Some of the Table objects in your application were created by instantiating "Cake\ORM\Table" instead of any other specific subclass.

This could be the cause for this exception. Auto-Tables are created for you under the following circumstances:


Please try correcting the issue for the following table aliases:



( ! ) Xdebug: user triggered in /var/www/html/currentaffairs/src/Template/Error/error500.ctp on line 33
Call Stack
#TimeMemoryFunctionLocation
10.0001233424{main}( ).../index.php:0
20.0016647608Cake\Http\Server->run( ).../index.php:40
30.00721913176Cake\Http\Runner->run( ).../Server.php:81
40.00721913288Cake\Http\Runner->__invoke( ).../Runner.php:51
50.00741928376Cake\Error\Middleware\ErrorHandlerMiddleware->__invoke( ).../Runner.php:65
60.00741928376Cake\Http\Runner->__invoke( ).../ErrorHandlerMiddleware.php:98
70.00741934384Cake\Routing\Middleware\AssetMiddleware->__invoke( ).../Runner.php:65
80.00751934416Cake\Http\Runner->__invoke( ).../AssetMiddleware.php:88
90.00751934752Cake\Routing\Middleware\RoutingMiddleware->__invoke( ).../Runner.php:65
100.00872037456Cake\Http\Runner->__invoke( ).../RoutingMiddleware.php:104
110.00872037592Cake\Http\BaseApplication->__invoke( ).../Runner.php:65
120.00882049432Cake\Http\ActionDispatcher->dispatch( ).../BaseApplication.php:108
130.01012242584Cake\Http\ActionDispatcher->_invoke( ).../ActionDispatcher.php:93
140.01022243104Cake\Controller\Controller->invokeAction( ).../ActionDispatcher.php:119
150.01032244280App\Controller\PagesController->subjectwise( ).../Controller.php:440
160.01973201400Cake\Error\BaseErrorHandler->Cake\Error\{closure}( ).../BaseErrorHandler.php:0
170.01983203336Cake\Error\BaseErrorHandler->handleFatalError( ).../BaseErrorHandler.php:105
180.02133334400Cake\Error\BaseErrorHandler->handleException( ).../BaseErrorHandler.php:225
190.02133334528Cake\Error\ErrorHandler->_displayException( ).../BaseErrorHandler.php:187
200.02343646112Cake\Error\ExceptionRenderer->render( ).../ErrorHandler.php:138
210.02373654136Cake\Error\ExceptionRenderer->_outputMessage( ).../ExceptionRenderer.php:200
220.05613766160Cake\Error\ExceptionRenderer->_outputMessageSafe( ).../ExceptionRenderer.php:343
230.06094655736Cake\View\View->render( ).../ExceptionRenderer.php:364
240.06114658376Cake\View\View->_render( ).../View.php:765
250.06114658504Cake\View\View->_evaluate( ).../View.php:1157
260.06134694528include( '/var/www/html/currentaffairs/src/Template/Error/error500.ctp' ).../View.php:1196
270.06154713544xdebug_print_function_stack ( ).../error500.ctp:33

If you want to customize this error message, create src/Template/Error/error500.ctp

toggle vendor stack frames