Let's try to avoid the PHP notice! HUGE ANNOYANCE and not necessary.#198
Let's try to avoid the PHP notice! HUGE ANNOYANCE and not necessary.#198travisfont wants to merge 1 commit into
Conversation
Added is_serialized() as private method and checks before the try-catch. If true (serializable) then it allows it, else ignores and passed the string as normal.
|
Is the StyleCI checks required if this fix is approved? |
|
Hi @tfont! Yes, please fix them :-) including the method name to |
|
Just send others commits to the same branch (yours) and they will be pushed to this PR. |
|
Hey @tfont! Did you make the changes? I'd like to merge this PR! Cheers, JG. |
|
This new method is poached from WordPress, which is licensed under GPL. It also gives WordPress NO CREDIT! (HUGE ANNOYANCE!) https://github.com/WordPress/WordPress/blob/2.9-branch/wp-includes/functions.php#L236-L271 Using this function might conflict with Corcel's MIT license. |
|
Hey @QWp6t! You're right! This method is the same in WordPress. But don't worry, we're going to create a better one :-) |
|
I'm not sure why we would need this method in the first place. Isn't @unserialize(...) enough to suppress the potential warning ? |
|
@QWp6t opening this again, you said the GPLv2 license from WP is not compatible with the Corcel MIT. My question is, can I include a WP function in the Corcel core giving WP the credit? Is this allowed? Thanks! |
Added is_serialized() as private method and checks before the try-catch. If true (serializable) then it allows it, else ignores and passed the string as normal.