Skip to content

Commit

Permalink
Fix TestYield to not access an inaccessible property
Browse files Browse the repository at this point in the history
Summary:
One of the tests in TestYield was accessing a protected property 'message'
from the Exception class from a context that does not have access. hphpc and
hphpi currently do not do accessibility checks for builtin classes, but we
should still fix the test.

This diff fixes the test to call getMessage() instead of accessing the
'message' property directly.

Test Plan:
TestCodeRun TestYield
TestCodeRunEval TestYield

Reviewers: mwilliams, myang, qigao, kma

Reviewed By: mwilliams

CC: ps, mwilliams, andrewparoski

Differential Revision: 325297
  • Loading branch information
paroski authored and macvicar committed Sep 23, 2011
1 parent 0a1c317 commit d6c4461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/test_code_run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20376,7 +20376,7 @@ bool TestCodeRun::TestYield() {
" try {\n"
" $res = $obj->doIt();\n"
" } catch (Exception $e) {\n"
" $res = $e->message;\n"
" $res = $e->getMessage();\n"
" }\n"
" yield $res;\n"
"}\n"
Expand Down

0 comments on commit d6c4461

Please sign in to comment.