I'm getting the following PHP warning:

Strict warning: Only variables should be passed by reference in yelp_api_replace_token() (line 22 of yelp_api.tokens.inc).

Apparently PHP does not like the way that array_shift is used in the following line:
$type = trim(str_replace('[', '', array_shift(explode(':', $token))));

I added an @ to quiet the warnings on my system, but the line should probably be rewritten. For now, here's the modified line:

$type = trim(str_replace('[', '', @array_shift(explode(':', $token))));

Comments

mikemiles86’s picture

Thanks you for pointing this issue out. If you could, submit a patch (https://drupal.org/node/707484) and I'll take a look at implementing it.

mikemiles86’s picture

Using @ to supress the error is not the correct approach to solve with issue (it only stops PHP from reporting it). I'll take a look at rearchitecting this part of the module to fix the pass by reference issue. Thansk for reporting it!

mikemiles86’s picture

Assigned: Unassigned » mikemiles86
mikemiles86’s picture

Status: Active » Fixed

I can confirm this bug, and have patched it. The fix will be included in the next release (7.x-2.4).

Thanks again for reporting it.

mikemiles86’s picture

Status: Fixed » Closed (fixed)