During the Vagrant setup process, the webhook privilege gets created by call of services/web/PrivilegeService1.svc/CreatePrivilege. On line 85, in public function CreatePrivilege($name, $code, $description, $icon, $enabled), there's a call to Privilege::findByCode($code).
app/services/PrivilegeService.php:
84: public function CreatePrivilege($name, $code, $description, $icon, $enabled) {
85: $privs = Privilege::findByCode($code);
app/domain/Privilege.php:
35: public static function findByCode($code) {
36: if (!self::checkCodeAccess(...$code))
The checkCodeAccess call tries to unpack $code argument, which it can only successfully do if the argument is an array or otherwise a Traversable object. This results in the following error:
<b>Warning</b>: Only arrays and Traversables can be unpacked in <b>/vagrant/app/domain/Privilege.php</b> on line <b>36</b><br />
There are other services that use the same call and might be susceptible to the same issue.
During the Vagrant setup process, the
webhook
privilege gets created by call ofservices/web/PrivilegeService1.svc/CreatePrivilege
. On line 85, inpublic function CreatePrivilege($name, $code, $description, $icon, $enabled)
, there's a call toPrivilege::findByCode($code)
.app/services/PrivilegeService.php:
app/domain/Privilege.php:
The
checkCodeAccess
call tries to unpack$code
argument, which it can only successfully do if the argument is an array or otherwise a Traversable object. This results in the following error:There are other services that use the same call and might be susceptible to the same issue.
Note: this does not impact production.