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

Bug: snuffleupagus requires quotes in ifs. #432

Closed
majkeldzordan opened this issue Aug 18, 2022 · 8 comments
Closed

Bug: snuffleupagus requires quotes in ifs. #432

majkeldzordan opened this issue Aug 18, 2022 · 8 comments
Assignees

Comments

@majkeldzordan
Copy link

majkeldzordan commented Aug 18, 2022

The latest version (previously there was no problem) has a strange bug. I accept the thought that this is kind of a patch, but:

  1. should not be enabled by default
  2. I have not found any info on how to turn it off.

Well. When I download the contents of the file (here: the test.txt file has only one character - a number, e.g. 0), the code:

$variable = file_get_contents ("test.txt");
if ($variable == "0") // works fine
if ($variable == 0) // doesn't work

I am not sure if for the above mentioned reason there is also a problem with older versions of WordPress (I do not penetrate its code so thoroughly), eg 4.9.x. After logging into wp-admin, there is a "update database" loop - it cannot be done. Disabling snuffleupagus or downgrade also solves this problem.

@jvoisin jvoisin assigned bef and unassigned bef Aug 18, 2022
@jvoisin
Copy link
Owner

jvoisin commented Aug 18, 2022

Do you have sp.sloppy_comparison.enable(); in your configuration file?

@jvoisin jvoisin self-assigned this Aug 18, 2022
@majkeldzordan
Copy link
Author

majkeldzordan commented Aug 18, 2022

Configuration file was empty. Adding this parameter will fix the problem (I'm currently working on an older version to keep everything working)? If I understand the documentation correctly then no.

@jvoisin
Copy link
Owner

jvoisin commented Aug 20, 2022

Can you try anyway?

@majkeldzordan
Copy link
Author

I tested it. I updated snuffleupagus, added to the configuration file:
sp.sloppy_comparison.enable ();
and it still doesn't work.

@jvoisin
Copy link
Owner

jvoisin commented Aug 21, 2022

I can reproduce the issue locally, there is indeed a bug in Snuffleupagus. I'm working on a fix.

@jvoisin
Copy link
Owner

jvoisin commented Aug 21, 2022

Are you using PHP8?

@majkeldzordan
Copy link
Author

I tested it on 7.4.

@jvoisin
Copy link
Owner

jvoisin commented Aug 21, 2022

Should be fixed via e6219a0

@jvoisin jvoisin closed this as completed Aug 21, 2022
@jvoisin jvoisin added this to the 0.9.0 - Elephant Gambit milestone Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants