Fix calling convention of php_pcre_replace/php_replace_in_subject
commitd4bc07e4ad1b6a050b0cd853b3c154efe0dd5e8d
authorAlexey Toptygin <alexeyt@fb.com>
Tue, 17 Nov 2020 18:28:40 +0000 (17 10:28 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 17 Nov 2020 18:32:57 +0000 (17 10:32 -0800)
tree338c47e0bebf62634ae2ba2bdef913636aea6928
parent93d2b3982578fe92e4a624fea2176ed15a18bd60
Fix calling convention of php_pcre_replace/php_replace_in_subject

Summary:
All call sites of php_pcre_replace were checking for a return of bool, asserting that it's false, and returning init_null instead. Change places in php_pcre_replace that return false to return ini_null instead and simplify the call sites.

php_replace_in_subject only ever returns string on init_null, so simplify call sites.

Reviewed By: ricklavoie

Differential Revision: D24914966

fbshipit-source-id: b37e5b0dd5d845badf1872fccdfae9f696db54bb
hphp/runtime/base/preg.cpp