Issue 4: get_headers might return multiple Content-Type's as array
Status:  Fixed
Owner: ----
Closed:  Sep 2010
Reported by w3b0id3@gmail.com, Sep 25, 2010
This is from the master HEAD revision.

When using "http://launchpad.net/~myusername" as my openID, I get an error:

strpos() expects parameter 1 to be string, array given

On line 00225: && strpos($headers['Content-Type'], 'application/xrds+xml') !== false) {


* Here's a dump of $headers['Content-Type'] when the error occurs:

Array ( [0] => text/html; charset=iso-8859-1 [1] => text/html;charset=utf-8 )


I think this might be because there is a redirection "http://launchpad.net/~myusername" -> "https://launchpad.net/~myusername". When I'm directly entering "https://launchpad.net/~myusername", it seems to work fine.

Does this have something to do with the redirection and cURL?
Sep 25, 2010
#1 w3b0id3@gmail.com
I also get the same error using "yahoo.com" as OpenID.

Here's contents of $headers['Content-Type']:

Array ( [0] => text/html [1] => text/html; charset=utf-8 )
Sep 25, 2010
Project Member #2 mewp...@gmail.com
Well, it's an undocumented behavior of get_headers() function.

@w3b0id3: It has nothing to do with cURL -- most recent versions use php streams instead of cURL, and it caused some problems.

Anyway, the bug will be fixed soon.
Status: Started
Sep 25, 2010
Project Member #3 mewp...@gmail.com
Ok, it should work fine now.

Thanks for reporting it.

By the way, you should use "me.yahoo.com", because "yahoo.com" doesn't, and never will work (because it doesn't contain any discovery information).
Status: Fixed
Sep 25, 2010
#4 w3b0id3@gmail.com
Yep, works great! Thanks.