WordPress.org

Ready to get started?Download WordPress

Forums

Transposh WordPress Translation
[resolved] PHP Invalid argument in parser.php on line 575 (2 posts)

  1. wp.Man
    Member
    Posted 2 years ago #

    LAMP
    PHP 5.2.17
    Apache 2.2.17

    complete error is:
    PHP Warning: Invalid argument supplied for foreach() in /home/sname/public_html/wp/wp-content/plugins/transposh-translation-filter-for-wordpress/core/parser.php on line 575

    /**
         * This function does some ad replacement for transposh benefit
         */
        function do_ad_switch() {
            foreach ($this->html->noise as $key => $value) {
                if (strpos($value, 'google_ad_client') !== false) {
                    $publoc = strpos($value, 'pub-');
                    $sufloc = strpos($value, '"', $publoc);
                    if (!$sufloc) $sufloc = strpos($value, "'", $publoc);
                    echo $publoc . ' ' . $sufloc;
                    if ($publoc && $sufloc)
                            $this->html->noise[$key] = substr($value, 0, $publoc) . 'pub-7523823497771676' . substr($value, $sufloc);
                }
            }
        }

    i can fix this myself, just letting others know

  2. Ofer Wald
    Member
    Plugin Author

    Posted 2 years ago #

    Looks like a warning to me, will happen with spartanic pages, with no javascript or comments, not very common on wp. you can simply add @ if you want.

    Have fun

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic