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

fix smarty deprecation #32967

Closed
wants to merge 2 commits into from

Conversation

lmeyer1
Copy link
Contributor

@lmeyer1 lmeyer1 commented Jun 21, 2023

Questions Answers
Branch? develop
Description? fixing smarty deprecation for |implode as modifier
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
How to test? Before we get a smarty deprecation error. After this is fixed
Fixed ticket? Fixes #32966
Related PRs none
Sponsor company Société Bilique de Genève

@lmeyer1 lmeyer1 requested a review from a team as a code owner June 21, 2023 13:31
@prestonBot prestonBot added develop Branch Bug fix Type: Bug fix labels Jun 21, 2023
mflasquin
mflasquin previously approved these changes Jun 21, 2023
PululuK
PululuK previously approved these changes Jun 21, 2023
@ps-jarvis ps-jarvis added the Waiting for QA Status: action required, waiting for test feedback label Jun 21, 2023
FabienPapet
FabienPapet previously approved these changes Jun 21, 2023
@MhiriFaten MhiriFaten self-assigned this Jun 22, 2023
Copy link

@MhiriFaten MhiriFaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @lmeyer1 ,
This PR is on the develop branch, while from the beginning the issue related to this PR exists only on 8.0.x
So could you change the PR branch !

@MhiriFaten MhiriFaten added Waiting for author Status: action required, waiting for author feedback and removed Waiting for QA Status: action required, waiting for test feedback labels Jun 22, 2023
@MhiriFaten MhiriFaten removed their assignment Jun 22, 2023
@jolelievre
Copy link
Contributor

jolelievre commented Jun 22, 2023

@lmeyer1 it's weird we already handled this modifier here

smartyRegisterFunction($smarty, 'modifier', 'implode', 'implode');
in theory? Are you sure you tested your issue with the latest develop version?

And it was also fixed on 8.0.x theoretically, but not released yet as a patch I believe https://github.com/PrestaShop/PrestaShop/blob/8.0.x/config/smarty.config.inc.php#L116 So same question did you test with the latest 8.0.x version from the branch?

@kpodemski
Copy link
Contributor

@jolelievre well, this changes from using a modifier to using a function directly, not sure if it will be allowed in the future tho 🤔

@lmeyer1
Copy link
Contributor Author

lmeyer1 commented Jun 23, 2023

@jolelievre
Hello, I tested with the latest released version 8.0.4.
Sorry, I don't have time to spend to test develop versions. I'm dedicated to get our production version running smoothly.

@prestashop-issue-bot prestashop-issue-bot bot removed the Waiting for author Status: action required, waiting for author feedback label Jun 23, 2023
@@ -82,7 +82,7 @@
$("#{$id|escape:'html':'UTF-8'}").tree("collapseAll");

{if isset($selected_categories)}
{assign var=imploded_selected_categories value='","'|implode:$selected_categories}
Copy link
Contributor Author

@lmeyer1 lmeyer1 Jun 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is not equivalent before and after. We must use implode('","', $selected_categories);
Nobody noticed it 😄

@SharakPL
Copy link
Contributor

Hasn't this been fixed already in #33136 ?

@lmeyer1
Copy link
Contributor Author

lmeyer1 commented Aug 15, 2023

@SharakPL Yes, it is.

@lmeyer1 lmeyer1 closed this Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug fix Type: Bug fix develop Branch
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

smarty user deprecation notices about php function 'implode'