Where to get a janitor profession?

Uncategorized — Антон Марчуков @ 01.11.06 17:17

I begun realizing that a profession of janitor is what I will be doing in the future.
Given very simple chunk of server-side code:

if ( $wr->getVal('doRemove') )
{
    if (! $user->checkPassword( $wr->getVal('pass', '') ) )
          $error[] = ERROR_WRONG_PASSWORD;
    
    echo 'terve';
}

Pass and doRemove are HTTP POST variables, the first is the name of text field for entering a password and the second is a name of the submit button in the form). Entering wrong password this works well and we will get “terve” indicating that, but if you enter the correct password you will get “terve” if you are running FireFox and get nothing if you are running MS Internet Explorer.

How in the world can it be? Where can I learn how to sweep streets? Is it better than Internet software development?

Resolution:

I did not test whether it is mine or IE bug, but after playing with different variations of the previous code, I rewrote it as:

if ( $wr->getVal('pass') )
{
    if (! $user->checkPassword( $wr->getVal('pass', '') ) )
          $error[] = ERROR_WRONG_PASSWORD;
    
    echo 'terve';
}

This works in both: MS IE and FireFox. But, anyway, what the hell the difference for the code that is not working only in Internet Explorer and only when a correct password entered (of cause it is stored in the database on the server and never output for a browser in any even related way).


Leave a comment


This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2017 Anton Martchukov's Weblog | powered by WordPress with Barecity