Skip to content

Conversation

daum
Copy link

@daum daum commented Apr 1, 2020

As of PHP 7.2 if you pass count(null) it'll emit a warning of Parameter must be an array or an object that implements Countable in … This makes sure that the $words is actually an array and not null, so it is in fact countable.

Copy link
Member

@jschroed91 jschroed91 left a comment

Choose a reason for hiding this comment

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

Hello there! Thanks so much for contributing!

I have a note here on PHP version compatibility that we should be considerate of here for this check, if you don't mind updating so that we can keep up that BC for now.

@daum
Copy link
Author

daum commented Apr 1, 2020

Let me know if you need anything else on it.

@daum
Copy link
Author

daum commented Apr 15, 2020

@jschroed91 Did you need anything else done on this PR?

@daum
Copy link
Author

daum commented Apr 28, 2020

@jschroed91 Do you have an update for when you think this may be merged?

{
while (true) {
if (!is_countable($words) || count($words) == 0) {
if (!is_array($words) || count($words) == 0) {
Copy link
Contributor

@SavageTiger SavageTiger Jan 25, 2021

Choose a reason for hiding this comment

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

Hi @daum could you please do strict type checking here? (using ===) and rebase this PR on the latest master

@SavageTiger
Copy link
Contributor

Hi 👋

Its been a while, but I have looked into this PR.

However I am a bit confused about it, since the preposed changes are both in the intertTag method, and the method gets called from processInsertOperation or processDeleteOperation and both those methods initiate a array that can never be null. So for now I am closing this PR.

If I am mistaken, feel free to let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants