[wp-trac] [WordPress Trac] #27231: Tweak wp-db.php so running WordPress on HHVM doesn't require hacking the core
WordPress Trac
noreply at wordpress.org
Fri Feb 28 09:47:27 UTC 2014
#27231: Tweak wp-db.php so running WordPress on HHVM doesn't require hacking the
core
-------------------------+-----------------------------
Reporter: dave1010 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
Running WordPress on HHVM currently requires manually editing wp-db.php as
HHVM doesn't support case-insensitive constants. Adding a check for HHVM
in wp-db.php would allow it to run without any hacks to the core and not
break BC.
This would be as simple as:
{{{
if (! defined( 'HHVM_VERSION' )) {
define( 'OBJECT', 'OBJECT', true );
} else {
define('OBJECT', 'OBJECT');
define('Object', 'OBJECT');
define('object', 'OBJECT');
}
}}}
See the [HHVM blog post](http://www.hhvm.com/blog/113/getting-wordpress-
running-on-hhvm) for more background on this.
Note: there's a small chance that plugin / theme authors are checking for
something like `oBjEcT`, instead of `object`, `OBJECT` or `Object`, so
removing case-insensitivity by default would be a (tiny) BC break.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27231>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list