diff --git a/src/aphront/AphrontRequest.php b/src/aphront/AphrontRequest.php --- a/src/aphront/AphrontRequest.php +++ b/src/aphront/AphrontRequest.php @@ -448,7 +448,7 @@ } 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 --- a/src/infrastructure/javelin/markup.php +++ b/src/infrastructure/javelin/markup.php @@ -77,7 +77,10 @@ $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) {