Skip to content

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

@ziggurad

Description

@ziggurad

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;
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions