MantisBT - v1.3 Release (Closed)
View Issue Details
0000365v1.3 Release (Closed)[All Projects] Generalpublic2010-02-01 22:272010-03-31 22:43
Reporteropto 
Assigned Tocaseydk 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.3 
Target VersionFixed in Version1.3 
Summary0000365: task_priority treated as string
Descriptionif task_priority=0,
then ::task->check() which is called in store() throws an error in

if ($this->task_priority == '') {
         $errorArray['task_priority'] = $baseErrorMsg . 'task priority is NULL';



everything is ok if

if task_priority='0'.

strangely enough,

task_priority=1 (or other integers) work.


The following claims to work with 0 and '0':

in cases when "0" is not intended to be empty, here is a simple function to safely test for an empty string (or mixed variable):


function _empty($string){
     $string = trim($string);
     if(!is_numeric($string)) return empty($string);
     return FALSE;
}
  


from

http://php.net/manual/de/function.empty.php

Klaus
Additional Informationhttp://forums.web2project.net/viewtopic.php?t=1644
TagsNo tags attached.
Attached Files

Notes
(0000776)
caseydk   
2010-03-27 20:42   
Resolved in r968
(0000810)
caseydk   
2010-03-31 22:43   
Closed in v1.3 release.

Issue History
2010-02-01 22:27optoNew Issue
2010-03-27 20:42caseydkNote Added: 0000776
2010-03-27 20:42caseydkStatusnew => resolved
2010-03-27 20:42caseydkResolutionopen => fixed
2010-03-27 20:42caseydkAssigned To => caseydk
2010-03-31 22:43caseydkNote Added: 0000810
2010-03-31 22:43caseydkStatusresolved => closed
2010-03-31 22:43caseydkFixed in Version => 1.3
2010-03-31 22:43caseydkProduct Version => 1.3