enchant_broker_get_dict_path: fix segfault#2835
Conversation
| } | ||
|
|
||
| if (value == NULL) { | ||
| RETURN_FALSE; |
There was a problem hiding this comment.
should this emit a warning/notice?
There was a problem hiding this comment.
I'm not sure what the common PHP practice is here, I'm don't like returning false that much since it doesn't give the impression the programmer did something wrong.
But I do believe it's a lot better then just segfaulting.
3de290b to
669cc17
Compare
|
@jelly Thanks for the PR. Please open a respective ticket in the bugtracker so the fix can be tracked in NEWS and the changelog. Also the PR should be rebased onto |
|
@cmb69 As a procedure tip, the way I usually apply PRs is by using the |
|
The phpt is missing a title, so it will be a borked test, also it seems like it doesn't expect the warning it actually adds too? |
|
@nikic Thanks for the tip regarding the patch URL! |
|
@cmb69 that's true, pr would have to be closed manually. But the git history would be cleaner. Thanks. |
|
It's not that I want to avoid to close the PR manually, but rather that I'd prefer to see on a quick glance whether a PR has been merged or closed. Sometimes I stumble over old PRs (for instance, linked from the bug tracker) and if the tag at the top says If the general consensus is that applying the patch is preferable, I'll change my current workflow (which basically resembles https://wiki.php.net/vcs/gitworkflow#merge_a_pull_request), of course. :) Anyhow, in this case the PR has to be overhauled anyway – see Kalle's comment above. |
|
This is related to bug #53070. |
|
@cmb69 nope, i just wanted to note that "me too" using rather Thanks. |
|
@cmb69 It indeeds look like bug #53070 do I need to link the pull request to that ticket? |
|
@cmb69 thanks and is the current docref fine? Then I'll adjust the other failing tests. |
|
In my opinion throwing a warning is fine and I don't see a potential BC break, because formerly it didn't work anyway (usually segfaulting). |
669cc17 to
40bb01a
Compare
enchant_broker_get_dict_path segfaults when the dict path is not setup, instead of segfaulting return false instead.
|
Comment on behalf of cmb at php.net: Applied with @5acb838. Thanks, Jelle! |
enchant_broker_get_dict_path segfaults when the dict path is not setup,
instead of segfaulting return false instead. Also added a test for the segfault.