From: Dan F <dfr...@cs...> - 2004-04-07 18:02:29
|
Okay, here is a different patch to put it in only upon DEBUG mode. Dan diff -b -u -r1.1 -r1.3 --- Request.php 29 Jan 2004 14:30:27 -0000 1.1 +++ Request.php 7 Apr 2004 18:01:17 -0000 1.3 @@ -79,7 +79,7 @@ function getURLtoSelf($args = false, $exclude = array()) { // Err... good point... - if ($this->isPost()) + if ((defined('DEBUG') and DEBUG) && $this->isPost()) trigger_error("Request::getURLtoSelf() should probably not be from POST", E_USER_NOTICE); Dan F wrote: > This is a minor thing. > > I see warnings like this when I do Wiki things: > > phpwiki2/lib/Request.php(In template 'browse'?)(In template > 'savepage'?)(In template 'body'?)(In template 'html'?):84: > Notice[1024]: Request::getURLtoSelf() should probably not be from POST > > Log out, log in, edit a page sometimes. This may be a useful warning > to a developer, but not a user. In fact, it makes users nervous. It > shows up if PHP is configured to spit out warnings. I claim Phpwiki > should run cleanly even if PHP is configured that way. Thus, here is a > patch to get rid of that warning: > > diff -b -u -r1.1 -r1.2 > --- Request.php 29 Jan 2004 14:30:27 -0000 1.1 > +++ Request.php 5 Apr 2004 16:33:20 -0000 1.2 > @@ -79,7 +79,7 @@ > function getURLtoSelf($args = false, $exclude = array()) { > > // Err... good point... > - if ($this->isPost()) > + if (0 && $this->isPost()) > trigger_error("Request::getURLtoSelf() should probably not > be from POST", > E_USER_NOTICE); > > > One could instead have it only spit out if Phpwiki was in some sort of > debug mode. > > Dan > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Phpwiki-talk mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk -- Dan Frankowski dfr...@cs... 612-626-8396 |