Branch: Tag:

2000-09-28

2000-09-28 03:43:38 by Per Hedbor <ph@opera.com>

Better fix for spurious '0' problem

Rev: server/etc/modules/Variable.pmod/module.pmod:1.25

1: - // $Id: module.pmod,v 1.24 2000/09/28 02:24:30 per Exp $ + // $Id: module.pmod,v 1.25 2000/09/28 03:43:38 per Exp $      #include <module.h>   #include <roxen.h>
204:    void add_warning( string to )    //! Like set_warning, but adds to the current warning, if any.    { -  set_warning( (get_warnings()||"") + to ); +  if(to) set_warning( (get_warnings()||"") + to );    }       int set( mixed to )
338:    "from verify_set_from_form\n" );    return;    } -  if( q[0] ) set_warning( q[0] ); -  set( q[1] ); +  if( b ) +  { +  set_warning( b[0] ); +  set( b[1] );    }    } -  +  }       string path()    //! A unique identifier for this variable.