• Resolved wp.Man

    (@wpman-1)


    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

Viewing 1 replies (of 1 total)
  • Plugin Author oferwald

    (@oferwald)

    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

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Invalid argument in parser.php on line 575’ is closed to new replies.