defstat / pln

GNU General Public License v3.0
0 stars 8 forks source link

Avoid headless use of Request object #23

Closed asmecher closed 5 years ago

asmecher commented 5 years ago

Many uses of the $request object will cause fatal errors when running in a headless context (i.e. kicked off by a cron job). In several cases the PLN plugin uses $request->getDispatcher() to get the dispatcher, which is then used to generate URLs. When run headlessly, $request->getDispatcher() will return null, leading to fatal errors. Use $application->getDispatcher() instead.