Skip to content

Instantly share code, notes, and snippets.

@mauriciopazpp
Created May 21, 2018 19:39
Show Gist options
  • Save mauriciopazpp/6930870d25466ca9c14a782344cb6db3 to your computer and use it in GitHub Desktop.
Save mauriciopazpp/6930870d25466ca9c14a782344cb6db3 to your computer and use it in GitHub Desktop.
PHP 7.2 - count(): Parameter must be an array or an object that implements Countable
if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
// Ignores notices and reports all other kinds... and warnings
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
// error_reporting(E_ALL ^ E_WARNING); // Maybe this is enough
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment