Skip to content

Commit

Permalink
Fixed Windows regex
Browse files Browse the repository at this point in the history
  • Loading branch information
xfra35 committed Nov 1, 2017
1 parent af8728f commit 939b472
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function execute($job,$async=TRUE) {
// Failing to do so will cause PHP to hang until the execution of the program ends.
$dir=dirname($this->script);
$file=basename($this->script);
if (!preg_match($this->windows?'/^[A-Z]:\\/i':'/^\//',$dir))
if (!preg_match($this->windows?'/^[A-Z]:\\\\/i':'/^\//',$dir))
$dir=getcwd().'/'.$dir;
if ($this->windows) {
pclose(popen(sprintf('start "cron" "%s" "%s\\%s" "/cron/%s"',$this->binary,$dir,$file,$job),'r'));
Expand Down

0 comments on commit 939b472

Please sign in to comment.