Skip to content

Commit

Permalink
Fix autoload.php require path
Browse files Browse the repository at this point in the history
  • Loading branch information
andreekeberg committed Sep 10, 2020
1 parent aec360e commit 2d9363c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/wp-search-replace.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<?php

require __DIR__ . '/../vendor/autoload.php';
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
// Require local autoload file
require_once __DIR__ . '/../vendor/autoload.php';
} else if (file_exists(__DIR__ . '/../../../autoload.php')) {
// Require global autoload file
require_once __DIR__ . '/../../../autoload.php';
}

// Define script name
$script = basename($argv[0]);
Expand Down

0 comments on commit 2d9363c

Please sign in to comment.