Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Dead worker causing PHP Fatal error: Call to a member function teardown() on a non-object #57

Open
JaredBoone opened this issue Sep 17, 2014 · 0 comments

Comments

@JaredBoone
Copy link

If a worker process dies for some reason then after the timeout interval Daemon::__destruct() calls teardown() on a null object. The result is PHP Fatal error: Call to a member function teardown() on a non-object. This could be handled gracefully by checking that the worker object is non-null before calling teardown().

Bug:

$this->{$object}->teardown();
unset($this->{$object});

Solution:

if(isset($this->{$object})){
    $this->{$object}->teardown();
    unset($this->{$object});
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant