Bug #38717

strftime() expects parameter 2 to be long, string given

Added by Simon Schaufelberger about 7 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Must have
Category:
TypoScript
Target version:
Start date:
2012-07-06
Due date:
% Done:

100%

TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

The typoscript rendering process with stdWrap does not handle empty values corrent:

Warning: strftime() expects parameter 2 to be long, string given in \typo3\sysext\cms\tslib\class.tslib_content.php on line 2571

A simple example to reproduce it:

10 = TEXT
10 {
strftime = %d
}

in the date stdWrap this was fixed, see #30931


Related issues

Related to TYPO3 Core - Bug #30931: date() expects parameter 2 to be long, string given in class.tslib_content.php Closed 2011-10-14
Related to TYPO3 Core - Task #40876: Add unit test for stdWrap_strftime Closed 2012-09-12

Associated revisions

Revision a0cf6ea5 (diff)
Added by Jigal van Hemert about 7 years ago

BUGFIX] strftime expects parameter 2 to be long, string given

Any zero length string value is replaced with the current timestamp.
(Just like the default value for the second parameter of
strtime/gmstrftime.)

Change-Id: I7cc43a09f75d21ab8db84c0191fa0c1c5d67ddb0
Fixes: #38717
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/12713
Reviewed-by: Stefan Neufeind
Reviewed-by: Marcus Schwemer
Tested-by: Marcus Schwemer
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert

Revision b4ec4f90 (diff)
Added by Simon Schaufelberger almost 7 years ago

[BUGFIX] strftime expects parameter 2 to be long, string given

Any zero length string value is replaced with the current timestamp.
(Just like the default value for the second parameter of
strtime/gmstrftime.)

Change-Id: I6a6102927d1e8e858970eda25cd525c925c5e629
Fixes: #38717
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/14715
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter

Revision aa5ba692 (diff)
Added by Simon Schaufelberger almost 7 years ago

[BUGFIX] strftime expects parameter 2 to be long, string given

Any zero length string value is replaced with the current timestamp.
(Just like the default value for the second parameter of
strtime/gmstrftime.)

Change-Id: I64a92d72d5ae680a6288b3e0cd8063d581de8566
Fixes: #38717
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/14716
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter

Revision c4badeae (diff)
Added by Simon Schaufelberger almost 7 years ago

[BUGFIX] strftime expects parameter 2 to be long, string given

Any zero length string value is replaced with the current timestamp.
(Just like the default value for the second parameter of
strtime/gmstrftime.)

Change-Id: I58225b1604607685a3fd4ac4ee50b806c552d326
Fixes: #38717
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/14717
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter

History

#1 Updated by Jigal van Hemert about 7 years ago

  • Category set to TypoScript
  • Status changed from New to Accepted
  • Assignee set to Jigal van Hemert
  • Target version set to 4.5.18
  • Complexity set to easy

#2 Updated by Gerrit Code Review about 7 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12713

#3 Updated by Simon Schaufelberger about 7 years ago

common guys, please merge that one. it has already been solved for the date function and this is just the same fix for the strftime function.

#4 Updated by Gerrit Code Review about 7 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12713

#5 Updated by Jigal van Hemert about 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Riccardo De Contardi almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF