SKPHP1989 / phpws

Automatically exported from code.google.com/p/phpws
0 stars 0 forks source link

Error : Only variables should be passed by reference (in websocket.server.php), with fix #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. launch the (dedemo) server in full E_ALL mode
2. launch the (demo) client
3. client gets disconnected

I dived into the code and found that the client gets disconnected by an error 
in websocket.server.php, at the line :

$resource = array_pop(preg_split("/\//", $url['path'], 0, PREG_SPLIT_NO_EMPTY));

This throws a notice : "Only variables should be passed by reference".

I changed the code to :

$pathSplit = preg_split("/\//", $url['path'], 0, PREG_SPLIT_NO_EMPTY);
$resource = array_pop($pathSplit);

And the notice is gone.

Cheers !

Original issue reported on code.google.com by jar...@gmail.com on 14 Sep 2012 at 7:44

GoogleCodeExporter commented 8 years ago
Fixed (see the latest git commit), thank you =D

Original comment by ch...@devristo.com on 15 Sep 2012 at 6:41

GoogleCodeExporter commented 8 years ago

Original comment by ch...@devristo.com on 15 Dec 2012 at 11:02