diff --git a/src/aphront/AphrontRequest.php b/src/aphront/AphrontRequest.php index 58fc6f9346..2561e397b6 100644 --- a/src/aphront/AphrontRequest.php +++ b/src/aphront/AphrontRequest.php @@ -448,7 +448,7 @@ final class AphrontRequest extends Phobject { } private function getPrefixedCookieName($name) { - if (strlen($this->cookiePrefix)) { + if (phutil_nonempty_string($this->cookiePrefix)) { return $this->cookiePrefix.'_'.$name; } else { return $name; diff --git a/src/infrastructure/javelin/markup.php b/src/infrastructure/javelin/markup.php index 533baad65e..673869a4c5 100644 --- a/src/infrastructure/javelin/markup.php +++ b/src/infrastructure/javelin/markup.php @@ -77,7 +77,10 @@ function phabricator_form(PhabricatorUser $user, $attributes, $content) { $is_post = (strcasecmp($http_method, 'POST') === 0); $http_action = idx($attributes, 'action'); - $is_absolute_uri = preg_match('#^(https?:|//)#', $http_action); + $is_absolute_uri = 0; + if (phutil_nonempty_string($http_action)) { + $is_absolute_uri = preg_match('#^(https?:|//)#', $http_action); + } if ($is_post) {