In GLP 10.0.3.
On the plan, I have this error:
Warning: strlen() expects parameter 1 to be string, array given in C:wamp64wwwglpisrcPlanningExternalEvent.php on line 160
My PlanningExternalEvent on line 160 :
$is_rrule = strlen($this->fields['rrule']) > 0;
Can you help me ?
Thx
$is_rrule = strlen($this->fields['rrule']) > 1;
2
Answers
As the errors says the
$this->fields['rrule']
Is not string you can use
var_dump($this->fields['rrule']);
To check your data
Your
$this->fields['rrule']
is not a string but an array.If you’re expecting this, please type check before getting the str_len
Alternatively, you can make sure that the field being set is in fact a string
before passing it to the function/method