Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is that a new behavior to Phalcon\Tag::prependTitle or it is a bug? #12233

Closed
borisdelev opened this issue Sep 19, 2016 · 5 comments
Closed

Is that a new behavior to Phalcon\Tag::prependTitle or it is a bug? #12233

borisdelev opened this issue Sep 19, 2016 · 5 comments
Labels
bug A bug report status: medium Medium
Milestone

Comments

@borisdelev
Copy link
Contributor

borisdelev commented Sep 19, 2016

In Phalcon v2.x when i use tag:prependTitle the title is prepended

Phalcon\Tag::setTitle("PAGE");
Phalcon\Tag::prependTitle("test1");
Phalcon\Tag::prependTitle("test2");

// Title now is "test2 - test1 - PAGE" (depends of separator)

In Phalcon v3.x when i use tag:prependTitle the title replaced

Phalcon\Tag::setTitle("PAGE");
Phalcon\Tag::prependTitle("test1");
Phalcon\Tag::prependTitle("test2");

// Title now is "test2 - PAGE" (depends of separator)

So which behavior is right?

Sorry for my English.
Thanks!

Details

  • Phalcon version: 3.x
  • PHP Version: 7
  • Operating System: Windows 10
  • Server: Apache
@virgofx
Copy link
Contributor

virgofx commented Sep 19, 2016

Definitely a bug, title prepending or appending should stack (that's how it was).

@googlle updated a bunch of the title code without doing tests apparently. Need to revert/fix this asap.

@sergeyklay
Copy link
Contributor

@butamuh4o Could you please add tests for expected behaviour?
https://github.com/phalcon/cphalcon/blob/master/tests/unit/Tag/TagTitleTest.php

@borisdelev
Copy link
Contributor Author

Yep, sure. :) thanks

@borisdelev
Copy link
Contributor Author

Finally. I did it :) Good luck all, and thanks for your patience.

@sergeyklay
Copy link
Contributor

Fixed in the 3.0.x branch.

@niden niden added bug A bug report status: medium Medium and removed Bug - Medium labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: medium Medium
Projects
None yet
Development

No branches or pull requests

4 participants