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

dev/core#907 Fix Deprecation notice for PHP7.2 in bin/cli.class.php #14155

Merged
merged 1 commit into from
Apr 30, 2019

Conversation

seamuslee001
Copy link
Contributor

Overview

Title says it all

Before

Deprecation notice shows

After

No deprecation notice

ping @eileenmcnaughton

@civibot
Copy link

civibot bot commented Apr 29, 2019

(Standard links)

@civibot civibot bot added the 5.13 label Apr 29, 2019
@eileenmcnaughton
Copy link
Contributor

jenkins is not happy @kcristiano can you test this - these each ones hurt my brain for some reason so I think I'd rather we do run a proper test

@seamuslee001
Copy link
Contributor Author

@eileenmcnaughton i created this little snippet of code

<?php
$array = [4,3,2,1];
while (list($k, $arg) = each($array)) {
  print_r("key {$k}, arg {$arg}\n");
}

foreach ($array as $k => $arg) {
  print_r("key {$k}, arg {$arg}\n");
}

which produced the following result

key 0, arg 4
key 1, arg 3
key 2, arg 2
key 3, arg 1
key 0, arg 4
key 1, arg 3
key 2, arg 2
key 3, arg 1

@kcristiano
Copy link
Member

@eileenmcnaughton I have tested, and I am not seeing any errors in my logs. But I was unable to reproduce without the patch either.

I've been using cli.php to run cron, is there a specific way to reproduce?

It does seem late to get this in to 5.13, would we be better off waiting to 5.14?

@seamuslee001
Copy link
Contributor Author

@kcristiano you will need to be using PHP7.2 for your cron job and i think you may need to ensure you are outputting E_WARNING

@kcristiano
Copy link
Member

@seamuslee001 Thanks. Turns out my cli was 7.3 with limited reporting (Errors only) I was able to reproduce by explicitly calling 7.2.

The Patch corrects the notice.

@eileenmcnaughton eileenmcnaughton merged commit dab9c39 into civicrm:5.13 Apr 30, 2019
@eileenmcnaughton eileenmcnaughton deleted the php_7_2_bin_cli_class branch April 30, 2019 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants