TypeError

Description

Message: Return value of Plugin_Routing::_carwash() must be an instance of ActiveRecord_Carwash, null returned
File: /var/www/wasstraatvacatures/library/Plugin/Routing.php
Line: 39

Source Code

28         if ($this->_isGeldigeTemplate($template)) {
29             return $this->_runCarwash($sd, $template, $tld);
30         }
31     }
32
33     protected function _carwash(string $sd) : ActiveRecord_Carwash
34     {
35         return Load::dbTable('Carwashes')
36             ->select()
37             ->where('is_live = 1')
38             ->where('url = "' . $sd . '"')
39             ->fetch();
40     }
41
42     protected function _isAdmin(string $sd) : bool
43     {
44         return $sd === 'admin';
45     }
46
47     protected function _isGeldigeTemplate(string $template) : bool
48     {
49         return in_array($template, $this->_templates);
50     }
51

Backtrace

#0 /var/www/wasstraatvacatures/library/Plugin/Routing.php(96): Plugin_Routing->_carwash('deautowasboulev...')
#1 /var/www/wasstraatvacatures/library/Plugin/Routing.php(29): Plugin_Routing->_runCarwash('deautowasboulev...', 'wasstraatvacatu...', 'nl')
#2 /var/www/wasstraatvacatures/library/Controller/Front.php(41): Plugin_Routing->dispatchLoopStartup(Object(Controller_Request))
#3 /var/www/wasstraatvacatures/library/Controller/Front.php(60): Controller_Front->notifyPlugins('dispatchLoopSta...')
#4 /var/www/wasstraatvacatures/www/index.php(23): Controller_Front->run()
#5 {main}
Date: Sun, 04 Dec 2022 17:00:51 +0100 URI: / REFERER: none