PHP Classes

Errors When i run it

Recommend this page to a friend!

      Pagination in PHP  >  All threads  >  Errors When i run it  >  (Un) Subscribe thread alerts  
Subject:Errors When i run it
Summary:there is some error when i want to use the class
Messages:2
Author: phpClass
Date:2015-06-01 13:04:08
 

  1. Errors When i run it   Reply   Report abuse  
Picture of  phpClass phpClass - 2015-06-01 13:04:08
Notice: Undefined index: _pge in C:\xampp\htdocs\pagination\list_records_ctrl.php on line 44
Notice: Undefined index: _rec in C:\xampp\htdocs\pagination\list_records_ctrl.php on line 45
Notice: Undefined index: _pge in C:\xampp\htdocs\pagination\list_records_ctrl.php on line 46
Notice: Undefined index: sortBy in C:\xampp\htdocs\pagination\list_records_ctrl.php on line 47
Notice: Undefined index: orderBy in C:\xampp\htdocs\pagination\list_records_ctrl.php on line 48
Notice: Undefined index: frmName in C:\xampp\htdocs\pagination\list_records_ctrl.php on line 76
Notice: Undefined index: frmEmail in C:\xampp\htdocs\pagination\list_records_ctrl.php on line 77
Notice: Undefined index: submitSearch in C:\xampp\htdocs\pagination\list_records_ctrl.php on line 96
Notice: Undefined index: viewAll in C:\xampp\htdocs\pagination\list_records_ctrl.php on line 120
Notice: Undefined index: viewAll in C:\xampp\htdocs\pagination\list_records.php on line 47
Notice: Undefined variable: multiSort in C:\xampp\htdocs\pagination\class_paging_inc.php on line 124

  2. Re: Errors When i run it   Reply   Report abuse  
Picture of Dave Smith Dave Smith - 2015-06-01 17:22:47 - In reply to message 1 from phpClass
These are low level notices used for debugging in the development environment. Ideally the developer would have taken care of all these during development, however some don't since they do not effect the operation.

So you need to set your error reporting for production. To do this, add the following line at the beginning of the file which is being ran (after the <?php line)...

error_reporting(E_ALL ^ E_NOTICE);

This is saying report all errors except low level notices. If you are still getting errors, then the script is buggy and those errors should be addressed. However, if the script is actually still performing you can turn the error reporting off using...

error_reporting(0);

Dave