Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.72 KB

BP_070_en.md

File metadata and controls

55 lines (41 loc) · 1.72 KB

Remove all warnings and notices

Identifiers

GreenIT V2 V3 V4
51 65 70

Categories

Life cycle Tiers Responsible
4. Production Datacenter System Administrator

Indications

Priority Implementation difficulty Ecological impact
2 3 2
Saved resources
Processor / Storage

Description

Warnings and notices slow down application servers such as PHP as they have to trace the errors origins and record messages explaining the associated problems in various logs systems.

Example

Avoid :

<html>
     <body>
         <form method="post" accept-charset="utf-8">
             <label>
                 First Name
                 <input type="text" name="first_name" value="<?php print $_POST['first_name'] ?>" placeholder="">
            </label>     
             <label>
                  Last Name
                  <input type="text" name="last_name" value="<?php print $_POST['last_name'] ?>" placeholder="">
             </label>     
         </form>
     </body>
</html>

$_POST['first_name'] and $_POST['last_name'] generate notices because they are not necessarily defined.

Validation rule

The number of ... is equal to or less than
warnings and notices 0