web2project: web-based project management

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000365 [v1.3 Release] Tasks minor always 2010-02-02 00:27 2010-04-01 00:43
Reporter opto View Status public  
Assigned To caseydk
Priority normal Resolution fixed  
Status closed   Product Version 1.3
Summary 0000365: task_priority treated as string
Description if 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 Information http://forums.web2project.net/viewtopic.php?t=1644 [^]
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000776)
caseydk (administrator)
2010-03-27 22:42

Resolved in r968
(0000810)
caseydk (administrator)
2010-04-01 00:43

Closed in v1.3 release.

- Issue History
Date Modified Username Field Change
2010-02-02 00:27 opto New Issue
2010-03-27 22:42 caseydk Note Added: 0000776
2010-03-27 22:42 caseydk Status new => resolved
2010-03-27 22:42 caseydk Resolution open => fixed
2010-03-27 22:42 caseydk Assigned To => caseydk
2010-04-01 00:43 caseydk Note Added: 0000810
2010-04-01 00:43 caseydk Status resolved => closed
2010-04-01 00:43 caseydk Fixed in Version => 1.3
2010-04-01 00:43 caseydk version => 1.3


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker