[TYPO3-core] RFC #12230: Bug: Function tslib_cObj::crop() is not fully multibyte safe
Vladimir Podkovanov
podkovanov at gmail.com
Mon Jan 31 19:30:43 CET 2011
Hi!
On 31.01.2011 18:15, Sebastian Fischer wrote:
> -1 on changing the concatination in a ternary. There is no improvement
> by putting the hole in one line. Neither does it improve readbility nor
> any performance.
I changed ternary to "if" because in original code strpos($content, ' ')
or strrpos($content, ' ') is executing in any case even if it is not
needed - if $crop2space is empty.
In my case $crop2space is checked first so it does improve performance.
On 31.01.2011 18:42, Jigal van Hemert wrote:
> I see a problem here: the if/else contains an assignment inside the
> condition. I think it's against CGL or at least discouraged.
CGL approves assignment in condition if it does make sense, in our case
assignment in condition save us from 1 more "if" so it faster. But I can
rewrite it. Attached ver. 2 without the assignment.
--
-rgds-
Vladimir
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 12230_v2.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110131/4e370285/attachment.txt>
More information about the TYPO3-team-core
mailing list