ProcessManager icon indicating copy to clipboard operation
ProcessManager copied to clipboard

Uncaught Error: Call to a member function getPid() on null

Open ziggurad opened this issue 2 years ago • 0 comments

Hello,

In my Sentry I found such an error: Uncaught Error: Call to a member function getPid() on null from: Elements\Bundle\ProcessManagerBundle\Model\MonitoringItem::isAlive code:

    public function isAlive(): bool
    {
        if ($this->isMessengerPending()) {
            return true;
        }
        if ($this->getPid()) {
            $messageBus = \Pimcore::getContainer()->get('messenger.bus.pimcore-core');
            $message = new CheckCommandAliveMessage($this->getId());
            $messageBus->dispatch($message);

            return (bool)self::getById($this->getId())->getPid();
        } else {
            return false;
        }
    }

ziggurad avatar Sep 26 '23 08:09 ziggurad