Skip to content

array_combine(): Both parameters should have an equal number of elements #127

@490626721

Description

@490626721

Describe the bug
An error occurred while trying to create the RBAC model.

array_combine(): Both parameters should have an equal number of elements

Check the error code address and find that the error exists in line CoreEnforcer.php 645

{ "file": "E:\\phpstudy_pro\\WWW\\c.com\\vendor\\casbin\\casbin\\src\\CoreEnforcer.php", "line": 645, "function": "array_combine", "args": [ [ "p_sub", "p_obj", "p_act" ], [ "测试, /admin/setup/wx", "ANY" ] ] }

It processes "test" and "/ admin / setup / Wx" into one field. The correct one should be

[ "测试“, ”/admin/setup/wx", "ANY" ]

** php version **
7.3

** SQL version **
5.7.26

** casbin version **
casbinPHP V3.19.0

** plug-in **
casbin/database-adapter V1.6.0

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

PHP-Casbin

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions