• Resolved dbais

    (@dbais)


    I just upgraded to v5.1.3 Now when I try to save a config change (even if there are no actual changes) I get the following PHP code error:

    ( ! ) Warning: strip_tags() expects parameter 1 to be string, array given in /Volumes/hd/userdata/david/Sites/wlivingstone/first-for-seat-cars/www/wp-content/plugins/google-analytics-for-wordpress/admin/class-admin.php on line 88
    Call Stack
    # Time Memory Function Location
    1 0.0024 313240 {main}( ) ../admin.php:0
    2 1.0202 40897256 do_action( ) ../admin.php:145
    3 1.0435 41613008 call_user_func_array:{/Volumes/hd/userdata/david/Sites/wlivingstone/first-for-seat-cars/www/wp-includes/plugin.php:505} ( ) ../plugin.php:505
    4 1.0435 41613040 Yoast_GA_Admin->init_settings( ) ../plugin.php:505
    5 1.0438 41613672 Yoast_GA_Admin->save_settings( ) ../class-admin.php:60
    6 1.0439 41615920 strip_tags ( ) ../class-admin.php:88

    print_r of $value on that line returns:

    a91931d8291XX-XXXXXX111eventdomainSave changesArray ( )

    Any ideas?

    db

    https://www.ads-software.com/plugins/google-analytics-for-wordpress/

Viewing 15 replies - 1 through 15 (of 21 total)
  • same here and I just updated also

    same here, WP 4.0.1 and YA 5.1.3.
    https://digipulse.com/

    Warning: strip_tags() expects parameter 1 to be string, array given in /home/REDACTED/public_html/REDACTED.com/wp-content/plugins/google-analytics-for-wordpress/admin/class-admin.php on line 88
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/REDACTED/public_html/REDACTED.com/wp-content/plugins/google-analytics-for-wordpress/admin/class-admin.php:88) in /home/REDACTED/public_html/REDACTED.com/wp-includes/pluggable.php on line 1179

    Why is this plugin including the following line of code regarding forceSSL, which I can’t turn off, and which is not included in Google Analytics default code to install? This site is not on an SSL.

    __gaTracker(‘set’, ‘forceSSL’, true);

    This “feature” is not mentioned ANYWHERE in the changelog – no mention of “SSL” or “secure” at all.

    The problem seems to be with the “Ignore Users” field (which is submitted as an array, causing the error above on line 88) — when I make changes to that field, I get the same error, and the changes are lost. The field becomes blank even if it was previously populated.

    In the settings page itself, I now also get an error at the top of the page, “There where no changes to save, please try again.” whenever I try to change that field.

    I’m getting the same error as well.

    WP 4.1 and YA 5.1.3

    now the difference is my details are saving in the system after going back on the error page, plus I have had a look in the source and I can see all the details there too.

    My details do save when this error comes up also

    To clarify, all of my settings do save, except for the “Ignore Users” field, which becomes blank — and then I only get the on-page error message when I attempt to fill it in again and save without changing any other settings.

    I am also having an issue…. Everything saves but everytime I try to save I get one of those errors.

    wp-content/plugins/google-analytics-for-wordpress/admin/class-admin.php on line 88

    Same here. Issue comes from the “Ignore Users” field:

    Warning: strip_tags() expects parameter 1 to be string, array given in /home/content/…/65/2242065/html/wp-content/plugins/google-analytics-for-wordpress/admin/class-admin.php on line 88

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/…/65/2242065/html/wp-content/plugins/google-analytics-for-wordpress/admin/class-admin.php:88) in /home/content/…/65/2242065/html/wp-includes/pluggable.php on line 1173

    I am getting an issues aswell:

    Warning: strip_tags() expects parameter 1 to be string, array given in /home/xxxx/public_html/wp-content/plugins/google-analytics-for-wordpress/admin/class-admin.php on line 88

    Warning: Cannot modify header information – headers already sent by (output started at /home/xxx/public_html/wp-content/plugins/google-analytics-for-wordpress/admin/class-admin.php:88) in /home/xxx/public_html/wp-includes/pluggable.php on line 1179

    yep same issue here.

    A fix!

    Go to Plugins > Editor. Select “Google Analytics by Yoast” and edit the file google-analytics-for-wordpress/admin/class-admin.php

    Change line 88:
    $value = strip_tags( $value );

    With this:
    $value = strip_tags( (string) $value );

    (is not the best solution, but works for me)

    @unostips Thanks a lot you fixed my issue on two sites
    freezetheme
    Thanks a lot spent my 3 hours
    A fix!

    Go to Plugins > Editor. Select “Google Analytics by Yoast” and edit the file google-analytics-for-wordpress/admin/class-admin.php

    Change line 88:
    $value = strip_tags( $value );

    With this:
    $value = strip_tags( (string) $value );

    (is not the best solution, but works for me)

    @unostips Thanks a lot you fixed my issue on two sites
    https://www.freezetheme.com
    Thanks a lot spent my 3 hours
    A fix!

    Go to Plugins > Editor. Select “Google Analytics by Yoast” and edit the file google-analytics-for-wordpress/admin/class-admin.php

    Change line 88:
    $value = strip_tags( $value );

    With this:
    $value = strip_tags( (string) $value );

    (is not the best solution, but works for me)

    Fix causes other errors on my site….

    I’m encountering the same issues when trying to update the “Ignore Users” field. Any updates/feedback from the plugin author???

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘PHP error when saving config changes’ is closed to new replies.