Stupid is as Stupid does

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As my web app is coming to completion, I added a means to search records (different from site search).

This involves reading post input and is many cases converting it to an integer.

Damn I feel dumb.

The search app wasn't working, so I did what I often do when troubleshooting crap - I put a die($variable) at various points to see if the variable is what it is suppose to be.

I kept getting blank returns from die after the conversion from a post string to an integer. I looked in the apache logs, system logs, I even tried rebooting - I couldn't figure why the smurf the variable wasn't converting to integer.

I even turned off eaccelerator in case that was causing it, though it never has given me issue before (except once when I was doing something in a really shoddy way - cleaned up my method and it behaved)

After several hours contemplating if I had bad RAM, an issue with the CPU, verifying my RPMs were good, wondering why I wasn't getting anything in the logs, it dawned on me.

If variable is an integer, die($var) returns nothing and is suppose to return nothing, it takes a string as an argument to echo on death - die("$var") is what I wanted.

I need sleep.

I did finally find the error and fix the record search problem.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux