Skip to content

Commit 2d9363c

Browse files
committed
Fix autoload.php require path
1 parent aec360e commit 2d9363c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bin/wp-search-replace.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<?php
22

3-
require __DIR__ . '/../vendor/autoload.php';
3+
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
4+
// Require local autoload file
5+
require_once __DIR__ . '/../vendor/autoload.php';
6+
} else if (file_exists(__DIR__ . '/../../../autoload.php')) {
7+
// Require global autoload file
8+
require_once __DIR__ . '/../../../autoload.php';
9+
}
410

511
// Define script name
612
$script = basename($argv[0]);

0 commit comments

Comments
 (0)