is not used any more and exists only for history. Post new tickets on the Github account. n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 13 years ago

Closed 13 years ago

#884 closed bug (fixed)

Jdatatime setFromString coding mistake

Reported by: mike Owned by:
Priority: high Milestone: Jelix 1.1.2
Component: jelix:forms Version: trunk
Severity: blocker Keywords: jdatetime, jforms
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:


In jFormsBase, line 220 $daorec->$name should be replace by $object->name else we've got an error like "trying to access a property on a non object..." when we trying to initialize a jdatetime value!

217 	            else if($ctrl->datatype instanceof jDatatypeLocaleDateTime
218 	                     && $properties[$name]['datatype'] == 'datetime') {
219 	                $dt = new jDateTime();
220 	                $dt->setFromString($daorec->$name, jDateTime::LANG_DTFORMAT);
221 	                $object->$name = $dt->toString(jDateTime::DB_DTFORMAT);
222 	            }
223 	            elseif($ctrl->datatype instanceof jDatatypeLocaleDate
224 	                    && $properties[$name]['datatype'] == 'date') {
225 	                $dt = new jDateTime();
226 	                $dt->setFromString($object->$name, jDateTime::LANG_DFORMAT);
227 	                $object->$name = $dt->toString(jDateTime::DB_DFORMAT);
228 	            }

Change History (1)

comment:1 Changed 13 years ago by laurentj

  • Resolution set to fixed
  • Status changed from new to closed

fixed in r1362. Thanks for your report

Note: See TracTickets for help on using tickets.