diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-02-03 02:35:13 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-02-03 02:35:13 -0500 |
commit | 675fd21cf145ff882463d604fe9e4bf9defa256e (patch) | |
tree | 394a8fbc073b1e7bda9de012e88b627247d20e58 /lib/init.php | |
parent | ab1856901367eab3ee390047f7829bdabfd2410d (diff) | |
download | ampache-675fd21cf145ff882463d604fe9e4bf9defa256e.tar.gz ampache-675fd21cf145ff882463d604fe9e4bf9defa256e.tar.bz2 ampache-675fd21cf145ff882463d604fe9e4bf9defa256e.zip |
Add a check that makes sure PDO is available
Calling an unavailable class is a fatal error, so people without PDO
were left with a fairly useless blank screen and no indicator of what
was wrong. Let's be a bit more user-friendly.
Diffstat (limited to 'lib/init.php')
-rw-r--r-- | lib/init.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/init.php b/lib/init.php index 9955c088..8b8248f0 100644 --- a/lib/init.php +++ b/lib/init.php @@ -53,7 +53,7 @@ else { // Verify that a few important but commonly disabled PHP functions exist and // that we're on a usable version -if (!function_exists('hash') || !function_exists('inet_pton') || (floatval(phpversion()) < 5.3)) { +if (!function_exists('hash') || !function_exists('inet_pton') || (floatval(phpversion()) < 5.3) || !class_exists('PDO')) { $link = $path . '/test.php'; } |