Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split() is deprecated in PHP >= 5.3 #13

Open
GoogleCodeExporter opened this issue Mar 3, 2016 · 0 comments
Open

split() is deprecated in PHP >= 5.3 #13

GoogleCodeExporter opened this issue Mar 3, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Install PHP 5.3

What is the expected output? What do you see instead?

No warnings. Since parse_mime_type() method is not using split() for regex, 
explode() is a suitable replacement.

What version of the product are you using? On what operating system?

trunk, revision 22

Please provide any additional information below.

http://us3.php.net/manual/en/function.split.php
http://us3.php.net/manual/en/function.explode.php

"Works for me" patch attached. Test result below.

php mimeparse.php
application/xml;q=1 - OK
application/xml - OK
application/xml;q= - OK
application/xml ; q=1;b=other - OK
application/xml ; q=2;b=other - OK
 *; q=.2 - OK
text/html;level=1 - OK
text/html - OK
text/plain - OK
image/jpeg - OK
text/html;level=2 - OK
text/html;level=3 - OK
application/xbel+xml - OK
application/xbel+xml; q=1 - OK
application/xml; q=1 - OK
application/*; q=1 - OK
* / * - OK
text/ *;q=0.5,* / *;q=0.1 - OK
text/html,application/atom+xml; q=0.9 - OK
application/json, text/javascript, */* - OK
application/json, text/html;q=0.9 - OK
image/png - OK
image/* - OK

Original issue reported on code.google.com by mradcli...@gmail.com on 9 Nov 2011 at 8:16

Attachments:

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

No branches or pull requests

1 participant