Don't load password hashing compat for HHVM
diff --git a/system/core/compat/password.php b/system/core/compat/password.php
index 92fdedb..a9355d5 100644
--- a/system/core/compat/password.php
+++ b/system/core/compat/password.php
@@ -39,7 +39,7 @@
// ------------------------------------------------------------------------
-if (is_php('5.5') OR ! is_php('5.3.7') OR ! defined('CRYPT_BLOWFISH') OR CRYPT_BLOWFISH !== 1)
+if (is_php('5.5') OR ! is_php('5.3.7') OR ! defined('CRYPT_BLOWFISH') OR CRYPT_BLOWFISH !== 1 OR defined('HHVM_VERSION'))
{
return;
}
diff --git a/tests/codeigniter/core/compat/password_test.php b/tests/codeigniter/core/compat/password_test.php
index 4014e74..c37c6ac 100644
--- a/tests/codeigniter/core/compat/password_test.php
+++ b/tests/codeigniter/core/compat/password_test.php
@@ -13,6 +13,12 @@
$this->assertFalse(defined('PASSWORD_BCRYPT'));
return $this->markTestSkipped("PHP versions prior to 5.3.7 don't have the '2y' Blowfish version");
}
+ // defined as of HHVM 2.3.0, which is also when they introduce password_*() as well
+ // Note: Do NOT move this after the CRYPT_BLOWFISH check
+ elseif (defined('HHVM_VERSION'))
+ {
+ $this->markTestSkipped('HHVM 2.3.0+ already has it');
+ }
elseif ( ! defined('CRYPT_BLOWFISH') OR CRYPT_BLOWFISH !== 1)
{
$this->assertFalse(defined('PASSWORD_BCRYPT'));