Skip to content

Conversation

@schlessera
Copy link
Member

@schlessera schlessera commented Oct 24, 2018

The constructor of the ReflectionMethod and ReflectionFunction classes can throw a ReflectionException if they are passed an invalid or broken $callable.

We should catch these exceptions and make sure they don't propagate and take the server down, just to stay on the safe side.

See http://php.net/manual/en/reflectionmethod.construct.php & http://php.net/manual/en/reflectionfunction.construct.php

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

The constructor of the `ReflectionMethod` and `ReflectionFunction` classes can throw a `ReflectionException` if they are passed an ivlaid or broken `$callable`.

We should catch these exceptions and make sure they don't propagate and take the server down, just to stay on the safe side.

See http://php.net/manual/en/reflectionmethod.construct.php & http://php.net/manual/en/reflectionfunction.construct.php
@Soean Soean added the [Feature] Meta Boxes A draggable box shown on the post editing screen label Oct 24, 2018
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the code point of view, this change looks good 👍 cc: @pento as this will need to be backported to the WordPress beta.

@pento
Copy link
Member

pento commented Nov 2, 2018

👍🏻

@schlessera: Would you mind creating a core ticket and patch for this?

@pento pento added this to the 4.3 milestone Nov 2, 2018
@pento pento merged commit 8a29b48 into master Nov 2, 2018
@pento pento deleted the fix/handle-metabox-exceptions branch November 2, 2018 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Meta Boxes A draggable box shown on the post editing screen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants