cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

[BUG]: Multiple times tag->title()->prepend() do not make title what i expect

Open borisdelev opened this issue 3 years ago • 1 comments

Issue When i use multiple times tag->title()->prepend() results its not what i expect. Will make it clear with example

Example

 $this->tag->title()->set('Start')->setSeparator(' - '); // Title will be just "Start"
 $this->tag->title()->prepend('Category'); // Title now will be "Category - Start"
 $this->tag->title()->prepend('Product'); // Title now will be "Category - Product - Start" ... and here is my issue

Expected behavior If i use prepend more than once, still need prepend items:

 $this->tag->title()->set('Start')->setSeparator(' - '); // Title will be just "Start"
 $this->tag->title()->prepend('Category'); // Title now will be "Category - Start"
 $this->tag->title()->prepend('Product'); // MUST BE "Product - Category - Start"

Details

  • Phalcon version: 5.1.4
  • PHP Version: 8.1.11
  • Operating System: Windows
  • Installation type: DLL
  • Server: Apache

Well... this is it. If you think my expectation is wrong behavior- okay, just need to know.

Thanks guys :) u great

borisdelev avatar Feb 20 '23 11:02 borisdelev

It looks like u fix that and maybe this is the right behaviour.

Thank you! A lot... cant wait v6. Then i can be better support-er :)

Wish u great day!

borisdelev avatar Feb 24 '23 08:02 borisdelev