Why a PHP warning appearing in Chrome but not in any other browser?
<p>I'm writing a web application in PHP, and I'm getting the following warning <em>in Google Chrome only:</em></p>

<blockquote>
  <p><strong>Warning:</strong> Cannot use a scalar value as an array in
  <strong>M:\xampp\htdocs\MyProjectTitle\php\classes.php</strong> on line <strong>18</strong></p>
</blockquote>

<p>Background: Please note that the web app works just fine in all browsers I tested (Firefox, Chrome, IE), but the warning appearing in Chrome is bugging the hell outta me.</p>

<p>Notes: I have tried restarting Chrome and clearing the Chrome cache. I have tried restarting the computer. I have tried searching the source code in FF and IE to see if the warning was just hidden, but to no avail. The warning is only popping up in Google Chrome, and I have no idea why.</p>

<p>UPDATE: Even though Safari also uses WebKit, it does not show the PHP warning. For some reason, Chrome is the only one that has the PHP warning. Weird stuff!</p>

<p>UPDATE: Here's the first 21 lines of code:</p>

<pre><code>class Presenter {
    public function includeFile($filePath) {
        if (is_readable($filePath)) {
            include $filePath;
        } else {
            echo '&lt;p&gt;&lt;strong&gt;ERROR 404&lt;/strong&gt;&lt;/p&gt;';
            echo '&lt;p&gt;The resource you requested could not be located.&lt;/p&gt;';
        }
    }

    public function sanitize($string) {
        return preg_replace("/\s/","_",$string);
    }

    public function set($varname,$value) {
        $this-&gt;$varname = $value;
        $_SESSION[$this-&gt;name][$varname] = $value;

        return $this;   // enables chaining!
    }

    // And there's more code after this, but I have cut it out here.
}
</code></pre>

<p>Note: The above code is inside a PHP class.</p>

<p>UPDATE: I know exactly what lines of code are causing the warning in Chrome (although I still have no clue why Chrome is the only browser that shows the warning). Since my webapp works perfectly despite the warning in Chrome, I have used <code>@</code> to suppress the warnings in Chrome (I'll fix the warning later).</p>
