Subversion Repositories ggsysinfo

[/] [modules/] [sysinfo/] [lib/] [PhpSecInfo/] [Test/] [Core/] [display_errors.php] - Blame information for rev 123

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 123 gg
<?php
2
/**
3
 * Test class for display_errors
4
 *
5
 * @package PhpSecInfo
6
 * @author Ed Finkler <coj@funkatron.com>
7
 */
8
 
9
 
10
/**
11
 * require the PhpSecInfo_Test_Core class
12
 */
13
require_once(PHPSECINFO_BASE_DIR.'/Test/Test_Core.php');
14
 
15
/**
16
 * Test class for display_errors
17
 *
18
 * @package PhpSecInfo
19
 */
20
class PhpSecInfo_Test_Core_Display_Errors extends PhpSecInfo_Test_Core
21
{
22
 
23
        /**
24
         * This should be a <b>unique</b>, human-readable identifier for this test
25
         *
26
         * @var string
27
         */
28
        var $test_name = "display_errors";
29
 
30
        var $recommended_value = FALSE;
31
 
32
        function _retrieveCurrentValue() {
33
                $this->current_value = $this->getBooleanIniValue('display_errors');
34
        }
35
 
36
 
37
        /**
38
         * Checks to see if display_errors is enabled
39
         *
40
         */
41
        function _execTest() {
42
                if ($this->current_value == $this->recommended_value) {
43
                        return PHPSECINFO_TEST_RESULT_OK;
44
                }
45
 
46
                return PHPSECINFO_TEST_RESULT_NOTICE;
47
        }
48
 
49
 
50
        /**
51
         * Set the messages specific to this test
52
         *
53
         */
54
        function _setMessages() {
55
                parent::_setMessages();
56
 
57
                $this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', 'display_errors is disabled, which is the recommended setting');
58
                $this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTICE, 'en', 'display_errors is enabled.  This is not recommended on "production" servers, as it could reveal sensitive information.  You should consider disabling this feature');
59
        }
60
 
61
 
62
}