Fixed PHP error on closing socket which is already closed #13

Merged
merged 1 commit into from Jun 16, 2011

Projects

None yet

3 participants

@yuvadm
Contributor
yuvadm commented Jun 16, 2011

When closing a socket which is already closed, a PHP error is thrown:
[2] fclose(): 129 is not a valid stream resource (..../lib/amqp/amqp.inc:425)

This patch ensures the socket is indeed open.

@videlalvaro videlalvaro merged commit 9cf0d20 into tnc:master Jun 16, 2011
Contributor
csautot commented Sep 8, 2011

Might be better to use is_resource(). See warning comparison usage with gettype() here: http://us2.php.net/manual/en/function.gettype.php

Collaborator

Could you make a pull request?

Contributor
csautot commented Sep 8, 2011

Added. Thanks for the response and for your work on this!

On Thu, Sep 8, 2011 at 2:29 PM, Alvaro Videla
reply@reply.github.com
wrote:

Could you make a pull request?

Reply to this email directly or view it on GitHub:
#13 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment