┌──────────────────────────────────────────────────────────────────────────────┐ │ $result │ └──────────────────────────────────────────────────────────────────────────────┘ Pentity\Application\Result (9) ( protected 'isImmutable' -> boolean false protected '__options' -> array (3) [ 'status_code' => integer 0 'partially_done' => boolean false 'result' => null ] private 'code' -> integer 0 private 'debugMode' -> boolean false private 'exception' -> Error (7) ( protected 'code' -> integer 0 protected 'file' -> string (94) "/mnt/www/build_119.motor1.com/module/index/src/Domain/Service/Builder/Builder/PhotoBuilder.php" protected 'line' -> integer 867 protected 'message' -> string (44) "Call to a member function getField() on null" private 'previous' -> null private 'string' -> string (0) "" private 'trace' -> Debug Backtrace (14): 1: .../module/index/src/Domain/Service/Builder/Assembler/GalleryBrowseAssembler.php:24 Index\Domain\Service\Builder\Builder\PhotoBuilder::buildFilterData(Index\Domain\Service\Builder\Builder\PhotoBuilderOptions $options) function assembleLogic(OptionsInterface $options) { $builder = $this->getBuilder(); $builder->buildDays($options); $builder->buildGalleryBrowse($options); $builder->buildGalleryPhotoCounts($options); $builder->buildFilterData($options); $builder->buildFirstPhotos($options); $builder->buildGalleryShareCounts($options); $builder->buildGalleryBrowseAlternateLinks($options); } } 2: .../pentity/assembler/src/Assembler/AbstractAssembler.php:70 Index\Domain\Service\Builder\Assembler\GalleryBrowseAssembler::assembleLogic(Pentity\Utils\Options\OptionsInterface $options) $this->getEventManager()->triggerEvent($event); // if result have been got from cache getting it insted of generating new content $result = null; $exception = null; try { if (null === ($result = $event->getParam('result'))) { $this->assembleLogic($options); $event->setParam('result', $result = $this->getBuilder()->getResult($options)); } } catch (\Throwable $exception) { // triggering error assemble event $event->setName(AssemblerEventInterface::ASSEMBLE_ERROR); $event->setParam('exception', $exception); $this->getEventManager()->triggerEvent($event); 3: .../module/index/src/Application/Service/PhotoProvider/GalleryBrowseProviderService.php:98 Pentity\Assembler\Assembler\AbstractAssembler::assemble($options = null) 'filter_submodel' => $options->getOption('filter_submodel'), 'filter_topic' => $options->getOption('filter_topic'), 'filter_autoshow' => $options->getOption('filter_autoshow'), 'pager' => $this->pagerConfig, 'extra_params' => [ 'where' => [ ['photo_gallery_edition_id', 'not in', $featuredBlockGallerysIds] ], ], ]); $result['featured'] = $featuredItems; return $result; 4: .../pentity/application/src/AbstractService.php:79 Index\Application\Service\PhotoProvider\GalleryBrowseProviderService::executeLogic(Pentity\Utils\Options\OptionsInterface $options) try { $serviceEvent->setParams([ 'invoke_options' => $invokeOptions ]); $this->getEventManager()->triggerEvent($serviceEvent); $result = $serviceEvent->getAppResult(); $result = $result ?: $this->executeLogic($invokeOptions); $serviceEvent->setAppResult($result); // partial errors logic if ($this->errors->hasErrors()) { $status = self::STATUS_PARTIALLY_DONE; $serviceEvent->setName(ServiceEventInterface::EVENT_PARTIAL_ERROR); $serviceEvent->setParam('errors', $this->errors); 5: .../module/index/src/Controller/PhotosController.php:36 Pentity\Application\AbstractService::execute(array $rawOptions = array()) 'filter_submodel' => $this->params()->fromRoute('submodel_alias'), 'filter_topic' => $this->params()->fromRoute('topic_id'), 'filter_autoshow' => $this->params()->fromRoute('autoshow_id'), 'filter_body_type' => $this->params()->fromRoute('body_type_alias'), 'year' => $this->params()->fromRoute('year'), 'month' => $this->params()->fromRoute('month'), 'day' => $this->params()->fromRoute('day'), 'page' => $this->params()->fromQuery('p') ]); if (!$result->getStatus()) { s($result); die; throw new HttpException(404, $result->getMessage()); } else { $result = $result->getOptions(); 6: .../pentity-modules/zendmvc/src/Controller/AbstractActionController.php:64 Index\Controller\PhotosController::galleryBrowseAction() if (!method_exists($this, $method)) { throw new HttpException(404, 'Page not found'); } // catching php exceptions also ErrorHandler::start(E_ALL); $this->beforeAction(); $response = $this->$method(); $this->afterAction(); $pageId = $this->getMCAService()->getMCA(); // throwing php exception if occurred ErrorHandler::stop(true); } catch (HttpException $ex) { $this->response->setStatusCode($ex->getCode()); 7: .../zendframework/zend-eventmanager/src/EventManager.php:322 Pentity\Module\Mvc\Zend\Controller\AbstractActionController::onDispatch(Zend\Mvc\MvcEvent $e) $event->stopPropagation(false); // Execute listeners $responses = new ResponseCollection(); foreach ($listOfListenersByPriority as $listOfListeners) { foreach ($listOfListeners as $listeners) { foreach ($listeners as $listener) { $response = $listener($event); $responses->push($response); // If the event was asked to stop propagating, do so if ($event->propagationIsStopped()) { $responses->setStopped(true); return $responses; } 8: .../zendframework/zend-eventmanager/src/EventManager.php:179 Zend\EventManager\EventManager::triggerListeners(Zend\EventManager\EventInterface $event, callable $callback = null) } /** * @inheritDoc */ public function triggerEventUntil(callable $callback, EventInterface $event) { return $this->triggerListeners($event, $callback); } /** * @inheritDoc */ public function attach($eventName, callable $listener, $priority = 1) { 9: .../zendframework/zend-mvc/src/Controller/AbstractController.php:106 Zend\EventManager\EventManager::triggerEventUntil(callable $callback, Zend\EventManager\EventInterface $event) $e->setName(MvcEvent::EVENT_DISPATCH); $e->setRequest($request); $e->setResponse($response); $e->setTarget($this); $result = $this->getEventManager()->triggerEventUntil(function ($test) { return ($test instanceof Response); }, $e); if ($result->stopped()) { return $result->last(); } return $e->getResult(); } 10: .../zendframework/zend-mvc/src/DispatchListener.php:138 Zend\Mvc\Controller\AbstractController::dispatch(Zend\Stdlib\RequestInterface $request, Zend\Stdlib\ResponseInterface $response = null) } $request = $e->getRequest(); $response = $application->getResponse(); $caughtException = null; try { $return = $controller->dispatch($request, $response); } catch (\Throwable $ex) { $caughtException = $ex; } catch (\Exception $ex) { // @TODO clean up once PHP 7 requirement is enforced $caughtException = $ex; } if ($caughtException !== null) { 11: .../zendframework/zend-eventmanager/src/EventManager.php:322 Zend\Mvc\DispatchListener::onDispatch(Zend\Mvc\MvcEvent $e) $event->stopPropagation(false); // Execute listeners $responses = new ResponseCollection(); foreach ($listOfListenersByPriority as $listOfListeners) { foreach ($listOfListeners as $listeners) { foreach ($listeners as $listener) { $response = $listener($event); $responses->push($response); // If the event was asked to stop propagating, do so if ($event->propagationIsStopped()) { $responses->setStopped(true); return $responses; } 12: .../zendframework/zend-eventmanager/src/EventManager.php:179 Zend\EventManager\EventManager::triggerListeners(Zend\EventManager\EventInterface $event, callable $callback = null) } /** * @inheritDoc */ public function triggerEventUntil(callable $callback, EventInterface $event) { return $this->triggerListeners($event, $callback); } /** * @inheritDoc */ public function attach($eventName, callable $listener, $priority = 1) { 13: .../zendframework/zend-mvc/src/Application.php:332 Zend\EventManager\EventManager::triggerEventUntil(callable $callback, Zend\EventManager\EventInterface $event) if ($event->getError()) { return $this->completeRequest($event); } // Trigger dispatch event $event->setName(MvcEvent::EVENT_DISPATCH); $event->stopPropagation(false); // Clear before triggering $result = $events->triggerEventUntil($shortCircuit, $event); // Complete response $response = $result->last(); if ($response instanceof ResponseInterface) { $event->setName(MvcEvent::EVENT_FINISH); $event->setTarget($this); $event->setResponse($response); 14: <ROOT>/index.php:57 Zend\Mvc\Application::run() ], 'php' => [ 'settings' => require 'config/php.config.php', ], ]); if (!defined('APP_NO_RUN')) { ZendApplciation::init(require 'config/application.config.php')->run(); } ) private 'firstCall' -> boolean false private 'message' -> string (62) "<ul><li>Call to a member function getField() on null</li></ul>" private 'pluginResults' -> Pentity\Utils\Options\DefaultOptions (3) ( protected 'isImmutable' -> boolean false protected '__options' -> array (0) [] private 'firstCall' -> boolean true ) private 'status' -> boolean false ) ════════════════════════════════════════════════════════════════════════════════ Called from .../module/index/src/Controller/PhotosController.php:40 [Index\Controller\PhotosController->galleryBrowseAction()]