mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 10:36:16 +00:00
Fixed problem with Socket::reset
Fixed bad conflict resolution in HttpSocket git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6780 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
c6e1a59891
commit
9251801602
2 changed files with 5 additions and 4 deletions
|
@ -469,7 +469,7 @@ class HttpSocket extends CakeSocket {
|
|||
$chunkLength = null;
|
||||
|
||||
while ($chunkLength !== 0) {
|
||||
if (!preg_match("/^([0-9a-f]+)(?:;(.+)=(.+))?\r\n/iU", $body, $match)) {
|
||||
if (!preg_match("/^([0-9a-f]+) *(?:;(.+)=(.+))?\r\n/iU", $body, $match)) {
|
||||
if (!$this->quirksMode) {
|
||||
trigger_error(__('HttpSocket::decodeChunkedBody - Could not parse malformed chunk. Activate quirks mode to do this.', true), E_USER_WARNING);
|
||||
return false;
|
||||
|
|
|
@ -266,15 +266,16 @@ class CakeSocket extends Object {
|
|||
* @return boolean True on success
|
||||
* @access public
|
||||
*/
|
||||
function reset($initialState = null) {
|
||||
if (empty($initalState)) {
|
||||
function reset($state = null) {
|
||||
if (empty($state)) {
|
||||
static $initalState = array();
|
||||
if (empty($initalState)) {
|
||||
$initalState = get_class_vars(__CLASS__);
|
||||
}
|
||||
$state = $initalState;
|
||||
}
|
||||
|
||||
foreach ($initalState as $property => $value) {
|
||||
foreach ($state as $property => $value) {
|
||||
$this->{$property} = $value;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue