diff options
author | Olav Morken <olav.morken@uninett.no> | 2012-04-12 08:09:13 +0000 |
---|---|---|
committer | Olav Morken <olav.morken@uninett.no> | 2012-04-12 08:09:13 +0000 |
commit | ce015c265322e2f922e6a6542724914b5ec2adc4 (patch) | |
tree | e971d3b69ff4b4bf9ff058b3957ffdf439d1dc20 /lib/SimpleSAML/Module.php | |
parent | 85e9ee57dfefcd5b726369aadfe2c5d675955e53 (diff) | |
download | simplesamlphp-ce015c265322e2f922e6a6542724914b5ec2adc4.zip simplesamlphp-ce015c265322e2f922e6a6542724914b5ec2adc4.tar.gz simplesamlphp-ce015c265322e2f922e6a6542724914b5ec2adc4.tar.bz2 |
Module: Log a better error if the module is missing a default-enable or default-enable file.
Thanks to Ryan Panning for providing this patch.
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3065 44740490-163a-0410-bde0-09ae8108e29a
Diffstat (limited to 'lib/SimpleSAML/Module.php')
-rw-r--r-- | lib/SimpleSAML/Module.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/SimpleSAML/Module.php b/lib/SimpleSAML/Module.php index 3ef7588..be35cbc 100644 --- a/lib/SimpleSAML/Module.php +++ b/lib/SimpleSAML/Module.php @@ -42,7 +42,9 @@ class SimpleSAML_Module { return FALSE; } - assert('file_exists($moduleDir . "/default-disable") || file_exists($moduleDir . "/default-enable")'); + if (assert_options(ASSERT_ACTIVE) && !file_exists($moduleDir . '/default-enable') && !file_exists($moduleDir . '/default-disable')) { + SimpleSAML_Logger::error("Missing default-enable or default-disable file for the module $module"); + } if(file_exists($moduleDir . '/enable')) { return TRUE; |