Bug #24276

PHP Warning may occur in backend UI with recent PHP version

Added by Alban Cousinie almost 10 years ago. Updated about 7 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


The following PHP Warning occurs on my PHP installation :

PHP Warning
PHP Warning: date() expects parameter 2 to be long, string given in typo3_src-4.4.4/t3lib/class.t3lib_tceforms.php line 3026

See also screenshot attached.

It could appear in any screen since the problem is located in class /typo3_src-4.4.4/t3lib/class.t3lib_tceforms.php

The bug is due to a bad type specification on the second parameter of function formatValue ($config, $itemValue) which is being specified as a string while it should be an int.

Changing the comment above the function definition fixes the problem.

(issue imported from #M16651)

t3bug.jpg View (395 KB) Administrator Admin, 2010-12-02 16:35

Related issues

Duplicates TYPO3 Core - Bug #30931: date() expects parameter 2 to be long, string given in class.tslib_content.php Closed 2011-10-14


#1 Updated by Steffen Ritter almost 10 years ago

just to be sure: changing a doc-comments stops showing a php warning?

#2 Updated by Alban Cousinie almost 10 years ago

Ho no sorry. I made a double check this morning and it has no influence (I quickly thought it had because in flow3 these are actually interpreted). When I tested this fix, the bug did not reappear because I forgot to uncomment another line.

A fix that works is to make sure $itemvalue has the good type by casting it to the atttended type on the first line of the function :

function formatValue ($config, $itemValue) {
$itemValue = (int)$itemValue; //$itemValue is due to be a timestamp

No more warnings with this fix.

#3 Updated by Chris topher almost 9 years ago

  • Target version deleted (0)

#4 Updated by Chris topher almost 9 years ago

Making sure it is an integer, is a good idea. We did the same in #30931, which is about the same kind of problem.

#5 Updated by Alexander Opitz over 7 years ago

As #30931 is resolved, can this issue be closed?

#6 Updated by Christian Kuhn about 7 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No


Also available in: Atom PDF