From 5b11238010619be50b40a1f681d98ac611db98f2 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 28 Jan 2016 20:31:46 +0100 Subject: [PATCH] Don't use system include path Sometimes systems have _old_ DB_DataObject classes lying around that get included by default, so we just try to avoid anything that we don't ship ourselves. BeS: I'll commit a patch that will make this issue go away MMN-o: that would be awesome! but it might upset bashrc who's working on a Debian package (where you're _supposed_ to include from /usr/php etc. :P) but I'll leave a comment along with it --- index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.php b/index.php index a4beec9e5e..de57f1078d 100644 --- a/index.php +++ b/index.php @@ -40,6 +40,12 @@ $_startTime = microtime(true); $_perfCounters = array(); +// We provide all our dependencies through our own autoload. +// This will probably be configurable for distributing with +// system packages (like with Debian apt etc. where included +// libraries are maintained through repositories) +set_include_path('.'); // mainly fixes an issue where /usr/share/{pear,php*}/DB/DataObject.php is _old_ on various systems... + define('INSTALLDIR', dirname(__FILE__)); define('GNUSOCIAL', true); define('STATUSNET', true); // compatibility -- 2.39.5