: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
private function isPreviousCoreFile($hexContentsSHAC) {
$hasPrefix = $this->_binaryListContains($this->coreHashesData, wfUtils::hex2bin($hexContentsSHAC), 32);
return $hasPrefix !== false;
* @param $binaryList The binary list to search, sorted as a binary string.
* @param $needle The binary needle to search for.
* @param int $size The byte size of each item in the list.
* @return bool|int false if not found, otherwise the index in the list
private function _binaryListContains($binaryList, $needle, $size /* bytes */) {
$p = substr($needle, 0, $size);
$count = ceil(wfWAFUtils::strlen($binaryList) / $size);
$mid = (int) (($high + $low) / 2);
$val = wfWAFUtils::substr($binaryList, $mid * $size, $size);