Project

General

Profile

Actions

Bug #20604

closed

PHP casting causes workspace message to appear in Web/View

Added by Niels Fröhling over 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-06-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Somehow the integer-comparison casting in PHP makes

$this->fePreview == 2

return TRUE for "$this->fePreview = 1"

You can reveal that paradox by doing:

function previewInfo()    {
if ($this->fePreview) {
if ($this->fePreview==2) {
$text = $this->fePreview . ' Preview of workspace ...

You'll get "1 Preview of workspace ..."

Solution: change all comparisons to ===
Effects: Doesn't show preview workspace information if no version-view or workspace-view is in effect

(issue imported from #M11311)


Files

11311.diff (1.41 KB) 11311.diff Administrator Admin, 2009-06-10 03:16
11311_v2.diff (1.46 KB) 11311_v2.diff Administrator Admin, 2009-11-06 23:03
Actions #1

Updated by Steffen Kamper about 15 years ago

I can't reproduce your paradoxon with php 5.3. However testing integer with "===" is correct and is part of the new CGL, so patch is cleanup. Attached new patch match the CGL complete.

Actions #2

Updated by Steffen Kamper about 15 years ago

committed to trunk, rev 6364

Actions

Also available in: Atom PDF