Jump to content

Recommended Posts

Posted

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 .

 

 

 

Posted

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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...