I found this entry in Drupal log after upgrading to PHP 7.3
Deprecated function: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in _google_tag_status_check() (line 321 of /var/www/test/web/sites/all/modules/contrib/google_tag/google_tag.module).

Comments

langelhc created an issue. See original summary.

solotandem’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
Category: Bug report » Task

Thanks for reporting this PHP API change. Simple fix to follow.

i-trokhanenko’s picture

Status: Active » Needs review
StatusFileSize
new565 bytes

Please review.

drup975’s picture

After applying #3 I get the following error:
Warning: strpos(): Empty needle in _google_tag_status_check() (line 321 of /home/clients//sites/all/modules/google_tag/google_tag.module)

jonas139’s picture

I didn't applied the patch from #3 but was getting the same error as the original issue and created a simple fix for this.
Please review.

liam morland’s picture

StatusFileSize
new567 bytes

The call to empty() is not needed because $status is sure to be set.

shaneonabike’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm that this works for me.

langelhc’s picture

Issue summary: View changes

solotandem’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the report and the patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.