|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-08-22 17:21 UTC] sniper@php.net
[2002-08-23 03:51 UTC] proton at fancreations dot com
[2002-08-23 07:45 UTC] sniper@php.net
[2002-08-24 11:31 UTC] proton at fancreations dot com
[2002-09-08 14:36 UTC] proton at fancreations dot com
[2002-09-08 16:35 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
I have this function I've been using to find a bug in my script, but that now appears to be a bug in PHP itself: function debug($msg) { echo '<b>DEBUG</b>: ' . $msg . '<br/>'; } I have this function on a page with a form on it. When I call this function when the form is not submitted yet, everything goes fine, but when I call it when I have submitted the form, it goes fine a couple of times but then it gives me this message, saying that the variable is undefined: Notice: Undefined variable: msg in f:\website\public_html\test\form.php on line 51 Line 51 is the "echo '<b>'..." line in the function above. I get simillar strange behaviour when I create a new object and then in the object's constructor I access $this and it also gives me an undefined variable error. I get this behaviour with both Apache 2 (2.0.40) and Apache 1 (1.3.26), with PHP versions 4.2.0 and 4.2.2. I haven't tested it on any other versions, but I think it will behave the same. Sometimes Apache 2 crashes on this, other times it would display the errors. After having this a couple of times, my computer even restarts by itself for some reason! Apache 1 always displays the error message.