From 01f6f960dc74b8df0a0cf23c28c1dd52f2f25ade Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Sat, 18 Feb 2017 13:16:58 +0100 Subject: [PATCH] Fixed bin autoload stuff --- bin/upnp-discover | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/upnp-discover b/bin/upnp-discover index 14cb075..27a9c73 100755 --- a/bin/upnp-discover +++ b/bin/upnp-discover @@ -8,7 +8,14 @@ // Licensed under GNU GPL v3 or later. // -require_once __DIR__."/../vendor/autoload.php"; +foreach ([ + __DIR__."/../../autoload.php", + __DIR__."/../vendor/autoload.php" +] as $autoload) { + if (file_exists($autoload)) { + require_once $autoload; break; + } +} use NoccyLabs\UPnP\SSDP\Device; use NoccyLabs\UPnP\SSDP\Discovery;