mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-02-21 19:00:54 +00:00
o fix in -takeValuesFromRequest:inContext: to avoid ecxception where
value is empty and formatter is date formatter git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18114 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
04ad543186
commit
f6f9379e37
1 changed files with 4 additions and 5 deletions
|
@ -85,7 +85,6 @@ RCS_ID("$Id$")
|
|||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
BOOL disabledValue=NO;
|
||||
LOGObjectFnStartC("GSWTextField");
|
||||
GSWStartElement(context);
|
||||
|
@ -98,11 +97,11 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWComponent* component=[context component];
|
||||
NSString* nameInContext=[self nameInContext:context];
|
||||
NSString* value=[request formValueForKey:nameInContext];
|
||||
NSString* value=[request stringFormValueForKey:nameInContext];
|
||||
id resultValue=nil;
|
||||
NSDebugMLLog(@"gswdync",@"nameInContext=%@",nameInContext);
|
||||
NSDebugMLLog(@"gswdync",@"value=%@",value);
|
||||
if (value)
|
||||
if ([value length]>0)
|
||||
{
|
||||
NSFormatter* formatter=[self formatterForComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"formatter=%@",formatter);
|
||||
|
@ -125,8 +124,8 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSException* exception=nil;
|
||||
NSString* valueKeyPath=[_value keyPath];
|
||||
LOGException(@"EOValidationException resultValue=%@ valueKeyPath=%@",
|
||||
resultValue,valueKeyPath);
|
||||
LOGException(@"EOValidationException formatter=%@ value='%@' resultValue='%@' valueKeyPath=%@ error=%@",
|
||||
formatter,value,resultValue,valueKeyPath,errorDscr);
|
||||
exception=[NSException exceptionWithName:@"EOValidationException"
|
||||
reason:errorDscr /*_exceptionDscr*/
|
||||
userInfo:[NSDictionary
|
||||
|
|
Loading…
Reference in a new issue