Project

General

Profile

Actions

Bug #32966

closed

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

Added by Daniel Siepmann almost 13 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2012-01-04
Due date:
% Done:

0%

Estimated time:
1.00 h
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

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.

Actions

Also available in: Atom PDF