Skip to content

Warnings become errors hash stream functions (other than hash_init) - #4625

Closed
markrandall wants to merge 1 commit into
php:masterfrom
markrandall:errorfy_hash_context
Closed

Warnings become errors hash stream functions (other than hash_init)#4625
markrandall wants to merge 1 commit into
php:masterfrom
markrandall:errorfy_hash_context

Conversation

@markrandall

Copy link
Copy Markdown

No description provided.

@krakjoe

Copy link
Copy Markdown
Member

Merged as 960da6d

Thanks.

@krakjoekrakjoe closed this Aug 29, 2019
Comment threadext/hash/hash.c
if (!hash->context) { \
php_error(E_WARNING, "%s(): supplied resource is not a valid Hash Context resource", func); \
RETURN_NULL(); \
zend_throw_error(NULL, "%s(): supplied resource is not a valid Hash Context resource", func); \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a TypeError? See discussion on #4643

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really the same case, more a bad error message. It should probably say something along the lines of "can't reuse an already finalized HashContext" or so.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. 👍

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@markrandall@krakjoe@salathe@nikic@carusogabriel@marandall