Closed paulmer closed 3 years ago
Hi @paulmer!
So, you're saying we could replace this:
filter_var($this->data['prev'],FILTER_VALIDATE_URL,FILTER_FLAG_HOST_REQUIRED)
... with this:
filter_var($this->data['prev'],FILTER_VALIDATE_URL)
That's right, more specifically the line should read:
if ((filter_var($this->data['prev'],FILTER_VALIDATE_URL) === FALSE) || (filter_var($this->data['link'],FILTER_VALIDATE_URL) === FALSE)) {
since filter_var appears twice with that flag. Sorry I'm not able to put a pull request together on this right now.
The filter_var on line 501 of system/application/controllers/books.php uses the deprecated flag FILTER_FLAG_HOST_REQUIRED which generates a visible warning when running in development mode. This flag has been implied with FILTER_VALIDATE_URL since PHP 5.2.1 and can safely be removed from the code to eliminate the warning.