Jump to content

Event Service.edit


Blesta Addons

Recommended Posts

i have in my a log a warning about a custom plugin, after a search a found the warning about a missing array index in service edit event .

$params = $event->getParams();
$client_id  = $params['vars']['client_id'];

from docs page the service edit event a client_id is returned in the vars array .can the staff check if their is something with this event and returned data .

 

 

 

Link to comment
Share on other sites

The docs should probably be more clear.  It says that vars "may include following".  The client_id is not guaranteed to exist (the validation rule uses an if_set on edit), so if no client_id was submitted to Services::edit() then none will be available to the event.  That being said, you can always fall back in the old_service client ID if one does not exist in vars.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...