Don't use toArray when iterating collections in CompactWriter.
commitf008a19026cf21cbbde04dfd3cb79853dc7f11a9
authorAlexey Toptygin <alexeyt@fb.com>
Wed, 1 Mar 2017 18:11:36 +0000 (1 10:11 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Wed, 1 Mar 2017 18:23:09 +0000 (1 10:23 -0800)
tree56676e5ddffd95cf090b4f8a0e924b1ab157ad34
parent74ea32066b82a95c12152c7250cb3d61313647df
Don't use toArray when iterating collections in CompactWriter.

Summary: Don't use toArray when iterating collections in thrift::CompactWriter::writeField. Add unit test so that we actually exercise these code paths with something other than PHP arrays.

Reviewed By: markw65

Differential Revision: D4627433

fbshipit-source-id: f7c1c6061557a37a403acaa63d8531b3da182200
hphp/runtime/ext/thrift/compact.cpp
hphp/test/slow/thrift/collections.php [new file with mode: 0644]
hphp/test/slow/thrift/collections.php.expect [new file with mode: 0644]