Review main Merged

2836[BUGFIX] Incompatible call to debug_backtrace() prior to PHP 5.3.5

Oliver Hader CR +2 V +2 Easy +1 −1 updated 06/03/13, 20:49

Commit message

The additional parameter to debug_backtrace() was introduced
with PHP 5.3.6. To stay compatible with PHP 5.3.0, it shall be
removed again - besides that the behaviour stays the same.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Markus Klein +1
    • Philipp Gampe +1
  • Verified V +2
    • Christian Kuhn +2
    • Philipp Gampe +1

Issues 1

Files 1

Review log 9

  1. Markus Klein commented on patch set 1 06/20/11, 18:12

    Looks good to me, but someone else must approve Despite my comment on the commit message, I agree to remove parameters that only specify the default value.
    Sorry, but that's not true. According to http://at.php.net/manual/en/function.debug-backtrace.php the parameter was changed in 5.3.6 to be a bitmask. TRUE has been working before. Please modify the commit message.
  2. Oliver Hader commented on patch set 1 06/20/11, 18:12

    Hm, the comment concerning the commit message was ignored... Besided that: Did somebody test it with PHP 5.3.5?
  3. Christian Kuhn commented on patch set 1 06/20/11, 18:12

    I did not explicitly test with 4.3.5, however, here is the history of this method: - 5.1.1: 'object' array was added to result array - 5.2.5: 'object' result can be turned off by providing FALSE as optional parameter (default TRUE) - 5.3.6: TRUE / FALSE was changed to $option, where DEBUG_BACKTRACE_PROVIDE_OBJECT is TRUE by default if no parameter is given So: TRUE is default ever since, the method signature did never change its default in this regard, thus, the option can be ommitted and debug_backtrace() and debug_backtrace(TRUE) and debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT) are identical. This patch is perfectly fine until there is a bug in php (google returned no result).
  4. Christian Kuhn commented on patch set 1 V 0 06/20/11, 18:12

    by team member; Looks good to me, approved
  5. Christian Kuhn merged patch set 1 06/20/11, 18:12

  6. Philipp Gampe commented on patch set 1 06/20/11, 18:12

    Verified; Looks good to me, but someone else must approve
  7. Philipp Gampe commented on patch set 1 06/20/11, 18:12

    please mind command from Markus
  8. Mr. Jenkins commented on patch set 1 06/20/11, 18:12

  9. Christian Kuhn commented on patch set 1 06/20/11, 18:12

    5.3.5