Issue Bug Closed

#32966Make TYPO3AJAX rendering false, null, 0, ...

Daniel Siepmann 01/04/12, 15:13 updated 06/15/15, 10:27

Description

At the moment, the class can’t render any of the following values: * “” (an empty string)
  • 0 (0 as an integer)
  • 0.0 (0 as a float)
  • “0” (0 as a string)
  • NULL
  • FALSE
  • array() (an empty array)
  • var $var; (a variable declared, but without a value in a class)

I think it’s okay for some of them, but I like to be able to return something like:

{"effected_rows":0}

That’s not possible at the moment, because calling:

$ajaxObj->addContent( 'effected_rows', 0);

Issn’t saved, because 0 is an “empty” value and not saved.

Everything takes part at the method: http://api.typo3.org/typo3v4/current/html/class_8typo3ajax_8php_source.html#l00119

I think this is a missing “feature” or more a bug.
I hope you will fix this. It’s not a big thing.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.