Source for file display_errors.php

Documentation is available at display_errors.php

  1. <?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/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. * Checks to see if display_errors is enabled
  31. *
  32. */
  33. function _execTest() {
  34. if (!$this->getBooleanIniValue('display_errors')) {
  35. return PHPSECINFO_TEST_RESULT_OK;
  36. }
  37. return PHPSECINFO_TEST_RESULT_NOTICE;
  38. }
  39. /**
  40. * Set the messages specific to this test
  41. *
  42. */
  43. function _setMessages() {
  44. parent::_setMessages();
  45. $this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', 'display_errors is disabled, which is the recommended setting');
  46. $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');
  47. }
  48.  
  49. }

Documentation generated on Tue, 24 Oct 2006 10:53:34 -0400 by phpDocumentor 1.3.0RC3