Development

#1834 (array_merge_recursive causes recursion warnings in sfGuardUser.php)

You must first sign up to be able to contribute.

Ticket #1834 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

array_merge_recursive causes recursion warnings in sfGuardUser.php

Reported by: davedash Assigned to: fabien
Priority: minor Milestone:
Component: sfGuardPlugin Version: 1.0.2
Keywords: Cc:
Qualification:

Description

I keep getting this error:

Warning: array_merge_recursive() [function.array-merge-recursive]: recursion detected in $SF_ROOT/plugins/sfGuardPlugin/lib/model/sfGuardUser.php on line 240

after signing in. The relevant line is the following:

      $this->groupPermissions = array_merge_recursive($this->groupPermissions, $this->getPermissions());

xdebug tells nothing about the recursion, and my suspicion is it has to do with my specific permissions in my APP.

I belong to a group that has the same permission that I have as a user, but that doesn't strike me as something that should cause a recursion error.

Perhaps array_merge_recursive isn't necessary?

Change History

08/13/07 14:49:32 changed by Leon.van.der.Ree

I get this same error, when a user gets a permission which is already in a group too.

I also think the array_merge_recursive isn't necessary, probably a normal array_merge will do fine, because as far as I have seen there aren't any recursive arrays. It are only keys=>permissions.

Finally I don't think it is nice to call the array groupPermissions, when it eventually contains all permissions...

09/13/07 23:54:12 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.
  • qualification set to Unreviewed.

in r5077