Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/AphrontRequest.php
Show First 20 Lines • Show All 442 Lines • ▼ Show 20 Lines | /* -( Accessing Request Data )--------------------------------------------- */ | ||||
public function setCookiePrefix($prefix) { | public function setCookiePrefix($prefix) { | ||||
$this->cookiePrefix = $prefix; | $this->cookiePrefix = $prefix; | ||||
return $this; | return $this; | ||||
} | } | ||||
private function getPrefixedCookieName($name) { | private function getPrefixedCookieName($name) { | ||||
if (strlen($this->cookiePrefix)) { | if (phutil_nonempty_string($this->cookiePrefix)) { | ||||
valerio.bozzolan: Thanks. This fix for PHP 8.1 should be very OK since the default is NULL and nothing alien… | |||||
Done Inline ActionsThanks. This fix for PHP 8.1 should be very OK since the default is NULL and nothing alien (like false) should arrive causing the related crash from the phutil check. If an alien value will arrive causing a crash, we can just discuss that specific case again. valerio.bozzolan: Thanks. This fix for PHP 8.1 should be very OK since the default is NULL and nothing alien… | |||||
return $this->cookiePrefix.'_'.$name; | return $this->cookiePrefix.'_'.$name; | ||||
} else { | } else { | ||||
return $name; | return $name; | ||||
} | } | ||||
} | } | ||||
public function getCookie($name, $default = null) { | public function getCookie($name, $default = null) { | ||||
$name = $this->getPrefixedCookieName($name); | $name = $this->getPrefixedCookieName($name); | ||||
▲ Show 20 Lines • Show All 511 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
Thanks. This fix for PHP 8.1 should be very OK since the default is NULL and nothing alien (like false) should arrive causing the related crash from the phutil check.
If an alien value will arrive causing a crash, we can just discuss that specific case again.