Skip to content

Discussion: error_reporting(0) rule #98

@dryabov

Description

@dryabov

Currently this rule detects just an error_reporting(0) code only (note: error_reporting(1-1) or error_reporting( 0 ) are passed). I suggest to revise this rule to detect usage of any function that may affect PHP code execution (independently of arguments passed):

assert_options
error_reporting
gc_disable
gc_enable
ini_set (ini_alter)
putenv

I'm not sure about:

  • set_time_limit: it is frequently used in the case of heavy server-side processing, I'd keep it as allowed one,
  • set_include_path: may be used to run some legacy libraries,

There may be rarely cases where ini_set is necessary, so it may be allowed (if followed by restoring settings back before script returns to Joomla).

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions