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
tests and fixes for set_doku_pref issues #2722
Conversation
- Read last entries (if duplicate) when get - Remove duplicate entries when set - Type-aware compare to decide append or modify - Remove $cookieVal empty check before setcookie, because there might be cases when we want to remove cookie
This prevents different type returned for DokuCookie.getValue(): DokuCookie.setValue('foo', false); console.log(DokuCookie.getValue('foo')); // false location.reload(); // pseudo code console.log(DokuCookie.getValue('foo')); // 'false'
The PHP part looks good, I'm not so sure about the JavaScript. Ideally the PHP and JavaScript should behave exactly the same. So setting something to |
Didn't realize this when I use
Currently it returns
I am not sure why |
Current usage according to Codesearch: |
I went through So...
As I mentioned, the only thing that hasn't been addressed yet, is that I don't understand "Are we relying on false being turned to 'false' somewhere"... |
What I meant with "Are we relying on false being turned to 'false' somewhere" is that I wasn't sure if any plugin maybe sets a cookie to |
Manual tests for javascript: see #2721 (comment) |
A fix for #2721.
Also a JavaScript cookie patch: Convert
value
type to string to prevent different type being returned byDokuCookie.getValue()
.AppVeyor is failing just because it doesn't like
styleutils_cssstyleini_test::test_mergedstyleini
in another PR.