Skip to content

Commit

Permalink
Merge pull request #16 from goblindegook/fix-hhvm-ci-constants
Browse files Browse the repository at this point in the history
Workaround for HHVM not supporting case-insensitive constants
  • Loading branch information
ericmann committed Dec 9, 2014
2 parents f816f80 + 113c363 commit 3529a7b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions WP_Mock/API/constant-mocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,21 @@
}

/**
* HHVM does not support case-insensitive constants.
*
* @since 0.71
* @see http://hhvm.com/blog/3095/getting-wordpress-running-on-hhvm
*/
if ( ! defined( 'OBJECT' ) ) {
define( 'OBJECT', 'OBJECT', true );
define( 'OBJECT', 'OBJECT' );
}

if ( ! defined( 'Object' ) ) {
define( 'Object', 'OBJECT' );
}

if ( ! defined( 'object' ) ) {
define( 'object', 'OBJECT' );
}

/**
Expand All @@ -58,4 +69,4 @@
*/
if ( ! defined( 'ARRAY_N' ) ) {
define( 'ARRAY_N', 'ARRAY_N' );
}
}

0 comments on commit 3529a7b

Please sign in to comment.