Welcome, Guest
Username: Password: Remember me

TOPIC: [CLOSED] Published is saved as 1 whatever entered

[CLOSED] Published is saved as 1 whatever entered 27 Aug 2012 13:23 #3314

  • mabdelaziz
  • mabdelaziz's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
I think this needs to be corrected.

The situation is I'm using a published field in my component, and this field type is integer.
The field is displayed as radio buttons in the edit form, and whatever I choose 'Yes' or 'No', the saved value is 'Yes'

I looked into the code and found this in the check() function of the table"
if ($this->published == null)
			$this->published = 1;

I guessed that this is the problem because 0 is evaluated as null, and it worked correct when I changed it to:
if ($this->published === null)
			$this->published = 1;
Last Edit: 14 Oct 2012 20:40 by admin.
The administrator has disabled public write access.

Re: Published is saved as 1 whatever value entered 14 Oct 2012 20:39 #4498

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
This is fixed in V2.0
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.060 seconds

Get Started