If a non 'superuser' user saves a node the following message displays
warning: mb_eregi_replace() expects parameter 3 to be string, array given in C:\Program Files\wamp\www\connect\trunk\www\sites\all\modules\contribs\pathauto\pathauto.inc on line 185.
I tracked down the culprit to this line of code. $form['uid']['#value'] = explode('|',$_COOKIE['known_user_role_details'],1);
Assume
$_COOKIE['known_user_role_details'] = "164|randomuser";
If we use $form['uid']['#value'] = explode('|',$_COOKIE['known_user_role_details'],1); to extract the uid.
The value returned to $form['uid']['#value'] will not be 164.
It will be $form['uid']['#value'] =Array([0] => 164|wai).
The solution is a 2 liner.
+ $fragments = explode('|',$_COOKIE['known_user_role_details']);
+ //get uid
+ $form['uid']['#value'] = $fragments[0];
Let me know if you have any questions. =)
| Comment | File | Size | Author |
|---|---|---|---|
| known_user_role_v1.patch | 3.93 KB | wkmit |
Comments
Comment #1
greg.harveyThanks for detail and patch. Will review ASAP. =)
Comment #2
greg.harveyCommitted and in latest release! Thanks! =)