Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-2000

Files should not contain characters before "<?php"

    XMLWordPrintable

    Details

    • Type: Bug Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Remove the extra characters before the open tag.
    • Default Severity:
      Minor
    • Impact:
      Low
    • Likelihood:
      Low
    • Covered Languages:
      PHP
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      2min

      Description

      Having characters before <?php can cause "Cannot modify header information" errors and similar problems with Ajax requests.

      Noncompliant Code Example

      test<?php  //Noncompliant
      // ...
      

      and

      // Noncompliant; newline before opening tag
      <?php
      // ...
      

      Compliant Solution

      <?php  
      // ...
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ann.campbell.2 Ann Campbell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: