If allow_url_fopen isnt enabled, fopen will return false.
thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:
@mikemeier the description of the PR you made is exactly the test case that you should add...
@Ocramius thats right. but i've no idea how to simulate "allow_url_fopen" off on a test-case.
PS: Why transfering the blob into a resource stream? I think the whole blob is already in memory... (base64)
@mikemeier this is not an fopen on a remote URI, it's a data URI, so I'm not even sure that the resource can ever be null
@Ocramius tested on a linux server with php 5.3: allow_url_fopen was off. result: fopen returned false. i dont think php try to understand what happens really in fopen command. if allow_url_fopen is off, fopen isnt allowed.
Interesting... so a data URI doesn't work with that setting... @mikemeier, did you check if there's a PHP bug on http://bugs.php.net/ for this?
Anyway, you're right: this cannot really be tested since allow_url_fopen is a PHP_INI_SYSTEM setting.
What about writing a test that is skipped if this directive is set to off?
@Ocramius http://www.php.net/manual/en/wrappers.data.php says it's not affected... hmmm.