Fixes to mb_convert_variables to match php5
commit08aef01ddca0f39fe031bd881920a6d05b965e21
authorLiran Nuna <liranuna@fb.com>
Fri, 18 Apr 2014 17:15:32 +0000 (18 10:15 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 18 Apr 2014 22:54:42 +0000 (18 15:54 -0700)
tree05a4c8415a051ae633ede82ea4aa748940e09760
parentb6103590f58bdcfdb6ac0dfc4f453986ee8628b6
Fixes to mb_convert_variables to match php5

This diff fixes two bugs in mb_convert_variables:
1) Non-array and non-object values got converted to a string, resulting in empty string instead of being passed-through
2) Empty arrays were converted into NULL instead of being passed-through

Fixes  #2424

Reviewed By: @ptarjan

Differential Revision: D1283001
hphp/runtime/ext/ext_mb.cpp
hphp/test/slow/ext_mb/mb_convert_variables_empty.php [new file with mode: 0644]
hphp/test/slow/ext_mb/mb_convert_variables_empty.php.expect [new file with mode: 0644]
hphp/test/slow/ext_mb/mb_convert_variables_nested_arrays.php [new file with mode: 0644]
hphp/test/slow/ext_mb/mb_convert_variables_nested_arrays.php.expect [new file with mode: 0644]