Error
Call to a member function isValid() on null Error thrown with message "Call to a member function isValid() on null" Stacktrace: #9 Error in /sites/dragoart/public_html/module/Tut/src/Controller/TutPublicListingController.php:54 #8 Tut\Controller\TutPublicListingController:dispatchEvent in /sites/dragoart/public_html/module/Utility/Nitro/src/DataStructures/AbstractServiceManagerActionController.php:245 #7 Nitro\DataStructures\AbstractServiceManagerActionController:onDispatch in /sites/dragoart/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php:320 #6 Laminas\EventManager\EventManager:triggerListeners in /sites/dragoart/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php:178 #5 Laminas\EventManager\EventManager:triggerEventUntil in /sites/dragoart/public_html/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php:105 #4 Laminas\Mvc\Controller\AbstractController:dispatch in /sites/dragoart/public_html/vendor/laminas/laminas-mvc/src/DispatchListener.php:117 #3 Laminas\Mvc\DispatchListener:onDispatch in /sites/dragoart/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php:320 #2 Laminas\EventManager\EventManager:triggerListeners in /sites/dragoart/public_html/vendor/laminas/laminas-eventmanager/src/EventManager.php:178 #1 Laminas\EventManager\EventManager:triggerEventUntil in /sites/dragoart/public_html/vendor/laminas/laminas-mvc/src/Application.php:319 #0 Laminas\Mvc\Application:run in /sites/dragoart/public_html/public/index.php:234
9
Error
/module/Tut/src/Controller/TutPublicListingController.php54
8
Tut\Controller\TutPublicListingController dispatchEvent
/module/Utility/Nitro/src/DataStructures/AbstractServiceManagerActionController.php245
7
Nitro\DataStructures\AbstractServiceManagerActionController onDispatch
/vendor/laminas/laminas-eventmanager/src/EventManager.php320
6
Laminas\EventManager\EventManager triggerListeners
/vendor/laminas/laminas-eventmanager/src/EventManager.php178
5
Laminas\EventManager\EventManager triggerEventUntil
/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php105
4
Laminas\Mvc\Controller\AbstractController dispatch
/vendor/laminas/laminas-mvc/src/DispatchListener.php117
3
Laminas\Mvc\DispatchListener onDispatch
/vendor/laminas/laminas-eventmanager/src/EventManager.php320
2
Laminas\EventManager\EventManager triggerListeners
/vendor/laminas/laminas-eventmanager/src/EventManager.php178
1
Laminas\EventManager\EventManager triggerEventUntil
/vendor/laminas/laminas-mvc/src/Application.php319
0
Laminas\Mvc\Application run
/public/index.php234

        if($this->isSearch && 1==3):

            $commandArgBuilder = $this->pageBuilder->getCommandArgBuilder();

            $searchForm=$this->sm()->get('Search\Form\SearchForm');

            $searchCommandArgProcessor=$this->sm()->get('Tut\Repository\Sphinx\CommandArgProcessor\Search');

            $this->pageBuilder->addCommandArgProcessor($searchCommandArgProcessor);

            $searchArg= $searchCommandArgProcessor->setSearchForm($searchForm);

            $commandArgBuilder->add($searchArg);

            $searchArg = $commandArgBuilder->getBuiltArg('search');

        endif;

        if($this->isSearch && $searchArg->isValid() && !$searchArg->hasSearchText()):

            $this->realUrl=$this->url()->fromRoute('tut/public/listing', []);

            $e->getRouteMatch()->setParam('action', 'permanentlyMoved');

        elseif($this->isSearch && $searchArg->isValid()):

            $e->getRouteMatch()->setParam('action', 'searchListing');

            $this->sm()->get('Search\Service\SitewideSearch')->setSearchForm($searchForm, 'tut');

        endif;


    }

    public function notFoundHereAction(){

        $r=new ViewModel();

Arguments
  1. "Call to a member function isValid() on null"
    
        $this->member=$member;
        return $this;
    }
    final protected function setAdmin(\User\Lib\Admin $admin){
        $this->admin=$admin;
        return $this;
    }
    final protected function isAdmin(){
        return (isset($this->admin) && is_object($this->admin))?true:false;
    }
    final protected function isMember(){
        return (isset($this->member) && is_object($this->member))?true:false;
    }

    final public function onDispatch(MvcEvent $e)
    {

        $this->dispatchEvent = $e;

        $this->dispatchEvent($e);

        return parent::onDispatch($e); // TODO: Change the autogenerated stub
    }



    //override if needed: called to delegate a service to createRealService method
    public function di(ContainerInterface $c){
        // do nothing
    }

    //override if needed: called to inject Dependency Injection
    public function getService()
    {
        //do nothing
    }

    //override if needed: called when the controller is being dispatched
    public function dispatchEvent(MvcEvent $e){
        //do nothing
Arguments
  1. Laminas\Mvc\MvcEvent {#431}
    
        }
 
        if ($this->sharedManager) {
            foreach ($this->sharedManager->getListeners($this->identifiers, $name) as $priority => $listeners) {
                $listOfListenersByPriority[$priority][] = $listeners;
            }
        }
 
        // Sort by priority in reverse order
        krsort($listOfListenersByPriority);
 
        // Initial value of stop propagation flag should be false
        $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;
                    }
 
                    // If the result causes our validation callback to return true,
                    // stop propagation
                    if ($callback && $callback($response)) {
                        $responses->setStopped(true);
                        return $responses;
                    }
                }
            }
        }
 
        return $responses;
    }
Arguments
  1. Laminas\Mvc\MvcEvent {#431}
    
            $event->setParams($argv);
        }
 
        return $this->triggerListeners($event, $callback);
    }
 
    /**
     * @inheritDoc
     */
    public function triggerEvent(EventInterface $event)
    {
        return $this->triggerListeners($event);
    }
 
    /**
     * @inheritDoc
     */
    public function triggerEventUntil(callable $callback, EventInterface $event)
    {
        return $this->triggerListeners($event, $callback);
    }
 
    /**
     * @inheritDoc
     */
    public function attach($eventName, callable $listener, $priority = 1)
    {
        if (! is_string($eventName)) {
            throw new Exception\InvalidArgumentException(sprintf(
                '%s expects a string for the event; received %s',
                __METHOD__,
                is_object($eventName) ? $eventName::class : gettype($eventName)
            ));
        }
 
        $this->events[$eventName][(int) $priority][0][] = $listener;
        return $listener;
    }
 
    /**
Arguments
  1. Laminas\Mvc\MvcEvent {#431}
    
  2. Closure($test): bool {#1068 …4}
    
     * @events dispatch.pre, dispatch.post
     * @param  Request $request
     * @param  null|Response $response
     * @return Response|mixed
     */
    public function dispatch(Request $request, Response $response = null)
    {
        $this->request = $request;
        if (! $response) {
            $response = new HttpResponse();
        }
        $this->response = $response;
 
        $e = $this->getEvent();
        $e->setName(MvcEvent::EVENT_DISPATCH);
        $e->setRequest($request);
        $e->setResponse($response);
        $e->setTarget($this);
 
        $result = $this->getEventManager()->triggerEventUntil(static fn($test): bool => $test instanceof Response, $e);
 
        if ($result->stopped()) {
            return $result->last();
        }
 
        return $e->getResult();
    }
 
    /**
     * Get request object
     *
     * @return Request
     */
    public function getRequest()
    {
        if (! $this->request) {
            $this->request = new HttpRequest();
        }
 
        return $this->request;
Arguments
  1. Closure($test): bool {#1068 …4}
    
  2. Laminas\Mvc\MvcEvent {#431}
    
            );
            return $this->complete($return, $e);
        } catch (Throwable $exception) {
            $return = $this->marshalBadControllerEvent($controllerName, $e, $application, $exception);
            return $this->complete($return, $e);
        } catch (Exception $exception) {  // @TODO clean up once PHP 7 requirement is enforced
            $return = $this->marshalBadControllerEvent($controllerName, $e, $application, $exception);
            return $this->complete($return, $e);
        }
 
        if ($controller instanceof InjectApplicationEventInterface) {
            $controller->setEvent($e);
        }
 
        $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) {
            $e->setName(MvcEvent::EVENT_DISPATCH_ERROR);
            $e->setError($application::ERROR_EXCEPTION);
            $e->setController($controllerName);
            $e->setControllerClass($controller::class);
            $e->setParam('exception', $caughtException);
 
            $return = $application->getEventManager()->triggerEvent($e)->last();
            if (! $return) {
                $return = $e->getResult();
            }
        }
 
        return $this->complete($return, $e);
Arguments
  1. Laminas\Http\PhpEnvironment\Request {#408}
    
  2. Laminas\Http\PhpEnvironment\Response {#418}
    
        }
 
        if ($this->sharedManager) {
            foreach ($this->sharedManager->getListeners($this->identifiers, $name) as $priority => $listeners) {
                $listOfListenersByPriority[$priority][] = $listeners;
            }
        }
 
        // Sort by priority in reverse order
        krsort($listOfListenersByPriority);
 
        // Initial value of stop propagation flag should be false
        $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;
                    }
 
                    // If the result causes our validation callback to return true,
                    // stop propagation
                    if ($callback && $callback($response)) {
                        $responses->setStopped(true);
                        return $responses;
                    }
                }
            }
        }
 
        return $responses;
    }
Arguments
  1. Laminas\Mvc\MvcEvent {#431}
    
            $event->setParams($argv);
        }
 
        return $this->triggerListeners($event, $callback);
    }
 
    /**
     * @inheritDoc
     */
    public function triggerEvent(EventInterface $event)
    {
        return $this->triggerListeners($event);
    }
 
    /**
     * @inheritDoc
     */
    public function triggerEventUntil(callable $callback, EventInterface $event)
    {
        return $this->triggerListeners($event, $callback);
    }
 
    /**
     * @inheritDoc
     */
    public function attach($eventName, callable $listener, $priority = 1)
    {
        if (! is_string($eventName)) {
            throw new Exception\InvalidArgumentException(sprintf(
                '%s expects a string for the event; received %s',
                __METHOD__,
                is_object($eventName) ? $eventName::class : gettype($eventName)
            ));
        }
 
        $this->events[$eventName][(int) $priority][0][] = $listener;
        return $listener;
    }
 
    /**
Arguments
  1. Laminas\Mvc\MvcEvent {#431}
    
  2. Closure($r): bool {#2 …4}
    
            $response = $result->last();
            if ($response instanceof ResponseInterface) {
                $event->setName(MvcEvent::EVENT_FINISH);
                $event->setTarget($this);
                $event->setResponse($response);
                $event->stopPropagation(false); // Clear before triggering
                $events->triggerEvent($event);
                $this->response = $response;
                return $this;
            }
        }
 
        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);
            $event->stopPropagation(false); // Clear before triggering
            $events->triggerEvent($event);
            $this->response = $response;
            return $this;
        }
 
        $response = $this->response;
        $event->setResponse($response);
        return $this->completeRequest($event);
    }
 
    /**
     * Complete the request
Arguments
  1. Closure($r): bool {#2 …4}
    
  2. Laminas\Mvc\MvcEvent {#431}
    

    } catch(Exception $e) {

        //var_dump(debug_backtrace());

        $gtgggg=[];

        $gtgggg['err']=$e->getMessage();
        $gtgggg['line']=$e->getLine();
        $gtgggg['file']=$e->getFile();
        $gtgggg['trace']=$e->getTrace();
        $gtgggg['code']=$e->getCode();
        d($gtgggg);

    }


else:

    Application::init(require 'config/' . PROJECT_ID_STRING . '/application.config.php')->run();
endif;
 

Environment & details:

Key Value
st
"serial killers"
empty
empty
empty
Key Value
__Laminas
array:2 [
  "_REQUEST_ACCESS_TIME" => 1710825784.0171
  "_VALID" => array:1 [
    "Laminas\Session\Validator\Id" => "79f0d4c1e378554f5b8a64bd21ac6441"
  ]
]
user
Laminas\Stdlib\ArrayObject {#667}
Key Value
APPLICATION_ENV
"production"
CONTEXT_DOCUMENT_ROOT
"/sites/dragoart/public_html/public"
CONTEXT_PREFIX
""
DOCUMENT_ROOT
"/sites/dragoart/public_html/public"
GATEWAY_INTERFACE
"CGI/1.1"
H2PUSH
"off"
H2_PUSH
"off"
H2_PUSHED
""
H2_PUSHED_ON
""
H2_STREAM_ID
"5"
H2_STREAM_TAG
"17602-646-5"
HTTP2
"on"
HTTPS
"on"
HTTP_ACCEPT
"*/*"
HTTP_HOST
"dragoart.com"
HTTP_REFERER
"https://drawinghub.com/tut/public/listing/search/?st=serial+killers"
HTTP_USER_AGENT
"claudebot"
HTTP_X_HTTPS
"1"
PATH
"/bin:/usr/bin"
PROJECT_ID_STRING
"drawingtutorials"
QUERY_STRING
"st=serial+killers"
REDIRECT_APPLICATION_ENV
"production"
REDIRECT_H2PUSH
"off"
REDIRECT_H2_PUSH
"off"
REDIRECT_H2_PUSHED
""
REDIRECT_H2_PUSHED_ON
""
REDIRECT_H2_STREAM_ID
"5"
REDIRECT_H2_STREAM_TAG
"17602-646-5"
REDIRECT_HTTP2
"on"
REDIRECT_HTTPS
"on"
REDIRECT_PROJECT_ID_STRING
"drawingtutorials"
REDIRECT_QUERY_STRING
"st=serial+killers"
REDIRECT_SCRIPT_URI
"https://dragoart.com/tut/public/listing/search/"
REDIRECT_SCRIPT_URL
"/tut/public/listing/search/"
REDIRECT_SITE_SERVER_NAME
"https://dragoart.com"
REDIRECT_SSL_TLS_SNI
"dragoart.com"
REDIRECT_STATUS
"200"
REDIRECT_UNIQUE_ID
"ZfkhN8kYifbdk9cJE_y6dAAAxhc"
REDIRECT_URL
"/tut/public/listing/search/"
REMOTE_ADDR
"44.222.149.13"
REMOTE_PORT
"45314"
REQUEST_METHOD
"GET"
REQUEST_SCHEME
"https"
REQUEST_URI
"/tut/public/listing/search/?st=serial+killers"
SCRIPT_FILENAME
"/sites/dragoart/public_html/public/index.php"
SCRIPT_NAME
"/index.php"
SCRIPT_URI
"https://dragoart.com/tut/public/listing/search/"
SCRIPT_URL
"/tut/public/listing/search/"
SERVER_ADDR
"51.81.245.42"
SERVER_ADMIN
"webmaster@dragoart.com"
SERVER_NAME
"dragoart.com"
SERVER_PORT
"443"
SERVER_PROTOCOL
"HTTP/2.0"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache"
SITE_SERVER_NAME
"https://dragoart.com"
SSL_TLS_SNI
"dragoart.com"
TZ
"UTC"
UNIQUE_ID
"ZfkhN8kYifbdk9cJE_y6dAAAxhc"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1710825783.9017
REQUEST_TIME
1710825783
argv
array:2 [
  0 => "st=serial"
  1 => "killers"
]
argc
2
empty
0. Whoops\Handler\PrettyPageHandler