Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordfenc.../vendor/wordfenc.../mmdb-rea.../src
File: NodeRecord.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Wordfence\MmdbReader;
[2] Fix | Delete
[3] Fix | Delete
use Wordfence\MmdbReader\Exception\InvalidOperationException;
[4] Fix | Delete
[5] Fix | Delete
class NodeRecord {
[6] Fix | Delete
[7] Fix | Delete
private $reader;
[8] Fix | Delete
private $value;
[9] Fix | Delete
[10] Fix | Delete
public function __construct($reader, $value) {
[11] Fix | Delete
$this->reader = $reader;
[12] Fix | Delete
$this->value = $value;
[13] Fix | Delete
}
[14] Fix | Delete
[15] Fix | Delete
public function getValue() {
[16] Fix | Delete
return $this->value;
[17] Fix | Delete
}
[18] Fix | Delete
[19] Fix | Delete
public function isNodePointer() {
[20] Fix | Delete
return $this->value < $this->reader->getNodeCount();
[21] Fix | Delete
}
[22] Fix | Delete
[23] Fix | Delete
public function getNextNode() {
[24] Fix | Delete
if (!$this->isNodePointer())
[25] Fix | Delete
throw new InvalidOperationException('The next node was requested for a record that is not a node pointer');
[26] Fix | Delete
try {
[27] Fix | Delete
return $this->reader->read($this->getValue());
[28] Fix | Delete
}
[29] Fix | Delete
catch (InvalidOperationException $e) {
[30] Fix | Delete
throw new FormatException('Invalid node pointer found in database', $e);
[31] Fix | Delete
}
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
public function isNullPointer() {
[35] Fix | Delete
return $this->value === $this->reader->getNodeCount();
[36] Fix | Delete
}
[37] Fix | Delete
[38] Fix | Delete
public function isDataPointer() {
[39] Fix | Delete
return $this->value > $this->reader->getNodeCount();
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
public function getDataAddress() {
[43] Fix | Delete
if (!$this->isDataPointer())
[44] Fix | Delete
throw new InvalidOperationException('The data address was requested for a record that is not a data pointer');
[45] Fix | Delete
return $this->value - $this->reader->getNodeCount() + $this->reader->getSearchTreeSectionSize();
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
}
[49] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function