Skip to content

Commit 0c1033f

Browse files
committed
Refator FunctionPatcher/Proxy
1 parent 14612f2 commit 0c1033f

File tree

1 file changed

+4
-4
lines changed
  • application/tests/_ci_phpunit_test/patcher/Patcher/FunctionPatcher

1 file changed

+4
-4
lines changed

application/tests/_ci_phpunit_test/patcher/Patcher/FunctionPatcher/Proxy.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,18 +263,18 @@ public static function openssl_random_pseudo_bytes(
263263
$crypto_strong = true;
264264
}
265265

266-
if (array_key_exists('openssl_random_pseudo_bytes', self::$patches))
266+
if (array_key_exists($function, self::$patches))
267267
{
268-
if (is_callable(self::$patches['openssl_random_pseudo_bytes']))
268+
if (is_callable(self::$patches[$function]))
269269
{
270-
$callable = self::$patches['openssl_random_pseudo_bytes'];
270+
$callable = self::$patches[$function];
271271
return call_user_func_array(
272272
$callable,
273273
[$length, &$crypto_strong]
274274
);
275275
}
276276

277-
return self::$patches['openssl_random_pseudo_bytes'];
277+
return self::$patches[$function];
278278
}
279279

280280
return openssl_random_pseudo_bytes($length, $crypto_strong);

0 commit comments

Comments
 (0)