GravityPDF/querypath

Wrap global functions in functions_exists check

Opened this issue · 0 comments

Guidelines

Description of the bug

To prevent a fatal PHP error occurring, let's wrap the global functions defined in qp_functions.php inside a functions_exists() check.

Ideally, these global functions would be removed, but they will need to be probably deprecated and then removed in a major version..

QueryPath version

latest

PHP Version and environment (server type, cli provider etc., enclosing libraries and their respective versions)

any

Minimal reproducible PHP+HTML snippet to replicate bug

function qp() { //do something }

require __DIR__ . '/vendor/autoload.php';

qp();