Bug #16642

TCEmain: Wrong syntax on checking NEW items

Added by Oliver Hader almost 13 years ago. Updated over 12 years ago.

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

0%

TYPO3 Version:
4.0
PHP Version:
5
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

There are some lines like in class.t3lib_tcemain.php
if (strstr($pid_value,'NEW'))

The syntax for substr is
string substr ( string string, int start [, int length] )

The code shown above will always return the first argument of the substr-call.
I guess a "preg_match" should have been standing there.

olly

(issue imported from #M4384)

tcemain.diff View (1.41 KB) Administrator Admin, 2006-10-13 13:05

tcemain_2.diff View (2.02 KB) Administrator Admin, 2006-10-13 13:42

History

#1 Updated by Oliver Hader almost 13 years ago

If this patch should be applied to the trunk version, I've got a feature wish to add (I know wrong type of issue, but correct file):

If a new record was passed to TCEmain and that record was created in database, it could happen that in the same session another field of that record is changed. I added some line that notice that a record already was processed and has a proper uid of it's table.

Have a look to tcemain_2.diff (include the substitution and the substr thingy)

#2 Updated by Oliver Hader almost 13 years ago

Just realized, that I must have been drunken on writing the bug-report.
No bug at all - everything is fine ;-)

#3 Updated by Michael Stucki almost 13 years ago

OK so I'm closing this bug. Can you please open a new issue for the feature request? Just to keep title and description up to date... Thanks.

Also available in: Atom PDF