LexikFormFilterBundle icon indicating copy to clipboard operation
LexikFormFilterBundle copied to clipboard

Ltrim issue in LexikFormFilterBundle/Event/Subscriber/DoctrineORMSubscriber.php

Open alexandrupietrareanu opened this issue 4 years ago • 0 comments

Line 81: $fieldName = ltrim($event->getField(), $rootPart->getAlias() . '.'); is not behaving as expected. Instead of replacing the string containing the alias and ".", it also replaces the first character after the point if is found in the second parameter.

From the php documentation: https://www.php.net/manual/en/function.ltrim.php

characters You can also specify the characters you want to strip, by means of the characters parameter. Simply list all characters that you want to be stripped. With .. you can specify a range of characters.

alexandrupietrareanu avatar Jan 07 '22 10:01 alexandrupietrareanu