6.0.0-beta1
7/18/25

[#2189] array_shift() doesn't work like expected with php5.1b2
Summary array_shift() doesn't work like expected with php5.1b2
Queue Horde Base
Queue Version 3.0.4
Type Bug
State Not A Bug
Priority 2. Medium
Owners
Requester bigmichi1 (at) bigmichi1 (dot) dyndns (dot) org
Created 06/27/2005 (7326 days ago)
Due
Updated 10/24/2005 (7207 days ago)
Assigned
Resolved 06/28/2005 (7325 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/24/2005 04:32:55 PM derek (at) battams (dot) ca Comment #6 Reply to this comment
Made the change with the .dist file, thanks.
10/24/2005 04:00:27 PM Chuck Hagenbuch Comment #5 Reply to this comment
Then you're using the same config file and didn't update it with the 
changes for 3.0.5, because this was fixed in the _example_ 
_configuration_ file.
10/24/2005 03:23:33 PM derek (at) battams (dot) ca Comment #4 Reply to this comment
Just noticed this bug was open against 3.0.4, I'm running 3.0.5 with 
the same results.
10/24/2005 03:17:04 PM derek (at) battams (dot) ca Comment #3 Reply to this comment
This same error has just resurfaced with PHP 5.0.5.  My distro 
upgraded it's PHP5 package this morning and i immediately hit this 
error.  I did the same to fix it as described here.  I think something 
needs to be done in the code base to address this.
06/28/2005 06:08:35 PM Chuck Hagenbuch Comment #2
State ⇒ Not A Bug
Priority ⇒ 2. Medium
Reply to this comment
First of all, this is an example in a configuration file; it won't 
work for everyone. Second, I think this is a bc break that will be 
fixed in future 5.1 betas - I've seen it come up on the internals 
list. If it's not, we can address it later.
06/27/2005 09:55:25 AM bigmichi1 (at) bigmichi1 (dot) dyndns (dot) org Comment #1
State ⇒ Unconfirmed
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ array_shift() doesn't work like expected with php5.1b2
Queue ⇒ Horde Base
Reply to this comment
after testing horde with php5.1b2 horde doesn't work anymore

on the entry page the following happens:

Fatal error: Only variables can be passed by reference in 
/var/www/localhost/htdocs/homepage/nuke77/horde/config/registry.php on 
line 48



i looked a little bit closer at this and found a bug report at 
bugs.php.net, specially http://bugs.php.net/bug.php?id=33466



so i changed the line:

     $webroot = strstr(dirname(__FILE__), '/' . 
array_shift(preg_split(';/;', $_SERVER['PHP_SELF'], 2, 
PREG_SPLIT_NO_EMPTY)));



to these two lines:

     $temp = preg_split(';/;', $_SERVER['PHP_SELF'], 2, PREG_SPLIT_NO_EMPTY);

     $webroot = strstr(dirname(__FILE__), '/' . array_shift($temp));

  and all works like it should



but i think there are more such array_shift operations to fix

Saved Queries