CoreCommunity ExtensionsDistributionsFeature-RequestsTYPO3 6.2 Projects (+)(Archived Projects)

Bug #5527

Mandatory Field with Value 0 is not accepted

Added by Dirk Diebel over 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2009-11-27
Priority:Must have Due date:
Assigned To:Andy Grunwald % Done:

100%

Category:Frontend Plugin
Target version:Powermail 1.5.6
TYPO3 Version: Has patch:
PHP Version:

Description

it's not possible to mark a field as mandatory and accept it with value 0.

the bug is in pi1/class.tx_powermail_mandatory.php line 111, where the value is getting checked but fails because of it's logic. 0 = FALSE

bugfix_mandatoryNumber.diff Magnifier (1.6 kB) Dirk Diebel, 2009-11-27 14:40


Related issues

duplicated by powermail - Bug #7370: Mandatory text field validation - "digits only" - error ... Closed 2010-04-19
duplicated by powermail - Bug #1502: Mandatory check fails if value="0" Closed 2008-09-12

Associated revisions

Revision 39410
Added by Andy Grunwald almost 5 years ago

Fixed bug #5527: Mandatory Field with Value 0 is not accepted

Revision 93fb4fcc
Added by Andy Grunwald almost 5 years ago

Fixed bug #5527: Mandatory Field with Value 0 is not accepted

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/powermail/trunk@39410 735d13b6-9817-0410-8766-e36946ffe9aa

History

#1 Updated by Brian over 5 years ago

I can confirm this behavior but this patch doesn't work for me.

First of all, it seems that the patch has reversed the new lines and old lines? Or maybe I'm just reading it wrong

Another thing, I had to change this line:

if (trim($this->sessionfields['uid'.$row['uid']])!=0){

To this:

if (trim($this->sessionfields['uid'.$row['uid']])!='0'){

- to make it work as expected

#2 Updated by Andy Grunwald almost 5 years ago

  • Target version set to Powermail 1.5.6

#3 Updated by Andy Grunwald almost 5 years ago

  • Assigned To set to Andy Grunwald

Fixed in r39410

#4 Updated by Andy Grunwald almost 5 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF