summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-02-18 23:45:11 +0100
committerAndrey Andreev <narf@devilix.net>2014-02-18 23:45:11 +0100
commitfed4ab48a3c99140ecf904fc68ce6b84185bbb67 (patch)
tree2b8392b394e8f1a21b00853df4150061af8f16c5
parentac8ac6a90812d3d2c880efe00c2293aef6fd8030 (diff)
Don't load password hashing compat for HHVM
-rw-r--r--system/core/compat/password.php2
-rw-r--r--tests/codeigniter/core/compat/password_test.php6
2 files changed, 7 insertions, 1 deletions
diff --git a/system/core/compat/password.php b/system/core/compat/password.php
index 92fdedb99..a9355d5d0 100644
--- a/system/core/compat/password.php
+++ b/system/core/compat/password.php
@@ -39,7 +39,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
// ------------------------------------------------------------------------
-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 4014e7415..c37c6ac0c 100644
--- a/tests/codeigniter/core/compat/password_test.php
+++ b/tests/codeigniter/core/compat/password_test.php
@@ -13,6 +13,12 @@ class password_test extends CI_TestCase {
$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'));