analytics-php icon indicating copy to clipboard operation
analytics-php copied to clipboard

send.php loading autoload.php relatively causes fatal error

Open fredericjaume-oc opened this issue 3 years ago • 1 comments

Hi !

With version 3.5.0, the send.php script loads the autoload.php that way:

require './vendor/autoload.php';

Which means that calling the script from another directory than that of the project (that uses the library) causes a fatal error, not being able to include the file, e.g. from a crontab with absolute paths.

Fatal error: require(): Failed opening required './vendor/autoload.php'

The autoload.php should probably be referenced as commonly done using __DIR__ in the path or if other use-cases are possible, some logic is probably missing.

fredericjaume-oc avatar Sep 09 '22 09:09 fredericjaume-oc

@fredericjaume-oc Thank you for pointing this out, we will work on this as soon as we can.

nd4p90x avatar Sep 09 '22 15:09 nd4p90x