Skip to content

Commit

Permalink
fix: errors on low PHP environments when PHP_INT_MIN constant is not …
Browse files Browse the repository at this point in the history
…available
  • Loading branch information
selul committed Jan 7, 2019
1 parent af6af48 commit 44eb4af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion optimole-wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ function optml() {
define( 'OPTML_VERSION', '1.1.2' );
define( 'OPTML_NAMESPACE', 'optml' );
define( 'OPTML_BASEFILE', __FILE__ );

// Fallback for old PHP versions when this constant is not defined.
if ( ! defined( 'PHP_INT_MIN' ) ) {
define( 'PHP_INT_MIN', - 999999 );
}
if ( ! defined( 'OPTML_DEBUG' ) ) {
define( 'OPTML_DEBUG', ( defined( 'TEST_GROUND' ) && TEST_GROUND ) ? true : false );
}
Expand Down

0 comments on commit 44eb4af

Please sign in to comment.