6.0.0-beta1
7/18/25

[#11894] Horde_Routes: Array to string conversion
Summary Horde_Routes: Array to string conversion
Queue Components
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester remi (at) famillecollet (dot) com
Created 12/15/2012 (4598 days ago)
Due
Updated 01/07/2013 (4575 days ago)
Assigned
Resolved 01/07/2013 (4575 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
01/07/2013 11:22:42 PM Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
 
01/07/2013 11:22:15 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 2cf53565d5283a8d9d4b08a512d269d5931f8430
Author: Jan Schneider <jan@horde.org>
Date:   Tue Jan 8 00:21:20 2013 +0100

     [jan] Fix generating cache key for generated URLs 
(remi@famillecollet.com, Bug #11894).

  framework/Routes/lib/Horde/Routes/Mapper.php |    2 +-
  framework/Routes/package.xml                 |    4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)

http://git.horde.org/horde-git/-/commit/2cf53565d5283a8d9d4b08a512d269d5931f8430
12/15/2012 03:14:12 PM remi (at) famillecollet (dot) com Comment #1
Priority ⇒ 2. Medium
New Attachment: Horde_Routes-php54.patch Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Components
Summary ⇒ Horde_Routes: Array to string conversion
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
When running test suite:
1) Horde_Routes_GenerationTest::testUrlWithEnviron
Array to string conversion
/dev/shm/BUILDROOT/php-horde-Horde-Routes-2.0.1-1.fc17.remi.x86_64/usr/share/pear/Horde/Routes/Mapper.php:596
/dev/shm/BUILD/php-horde-Horde-Routes-2.0.1/Horde_Routes-2.0.1/test/Horde/Routes/GenerationTest.php:732
...

I know this warning is new in PHP 5.4 which is not supported, but at 
least it allow to detect an issue.

Reading the code, kargs is obviously an array, so $cacheKeyScriptName 
is going to always be set to "array" (which is the standard behavior 
in PHP 5.3, and which raise a warning in PHP >= 5.4

The proposed patch use "serialize" to transform $kargs to something 
usable as a array index.

Saved Queries