php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24127 Opera throws JavaScript-Errors on "onload"-Event
Submitted: 2003-06-11 10:22 UTC Modified: 2003-12-30 13:01 UTC
From: simon dot sattes at headwork dot de Assigned: goba (profile)
Status: Closed Package: Website problem
PHP Version: 4.3.1 OS: Win2000 Opera 7.11
Private report: No CVE-ID: None
 [2003-06-11 10:22 UTC] simon dot sattes at headwork dot de
On every pageview Opera 7.11 (Win2000) throws an onload-Error-Event, which follows below:

Event thread: onload
Error:
name: ReferenceError
message: Statement on line 64: Reference to undefined variable: No such variable 'show'
Backtrace:
  Line 64 of linked script http://static.php.net/www.php.net/userprefs.js
    for (var i = 0; i < show.length; i++)
  In unknown script
    searchHistory();
  At unknown location
    {event handler trampoline}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-11 13:20 UTC] goba@php.net
Erm, sorry. I was not able to test with opera, and quite mainstream [it seemed to be] JS syntax, which should work in all browsers. Seems that it is not working though.

The script there has a with{} block, which enables us to have mor logical looking code. I guess Opera understands that with{} block, as it drops no error on that. It enters that block, and gives an error on a reference, which should be parsed in the context of the with{} block.

We have this script for quite some days now online, and you are the first to complain about a JS error. Can you please check with another Opear browser version too? I suppose this is a bug in Opera. Or in case you think we have buggy JS code, then I would be happy if you would be able to provide us a better one, so everyone will be satisfied.

Thanks for your report
 [2003-06-12 03:13 UTC] simon dot sattes at headwork dot de
Well, I've tested it with several versions, and it seems it only occurs with Opera 7 (Opera 6 doesn't complain about it).

Unfortunately I'm at work right now, so I don't have the time to present a better version - sorry (maybe when I'm at home).

Maybe no one noticed it so far, because JS-error notification is off as default (as far as I can remember).
 [2003-12-30 13:01 UTC] goba@php.net
That with{} construct was removed some time ago, so this should be fixed. Please reopen if you still experience the problem.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Jun 18 06:00:02 2026 UTC