1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-11 07:11:04 +01:00

Use class_exists() before is_subclass_of()

Summary: HPHP doesn't autoload without it.

Test Plan: /p/vrana/feed/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3009
This commit is contained in:
vrana 2012-07-18 19:49:44 -07:00
parent 00160ab2a3
commit 6e63674b2d

View file

@ -53,9 +53,10 @@ abstract class PhabricatorFeedStory implements PhabricatorPolicyInterface {
foreach ($data as $story_data) {
$class = $story_data->getStoryType();
$ok = false;
try {
$ok = is_subclass_of($class, 'PhabricatorFeedStory');
$ok =
class_exists($class) &&
is_subclass_of($class, 'PhabricatorFeedStory');
} catch (PhutilMissingSymbolException $ex) {
$ok = false;
}