Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Typos in cookie component documentation #20

Closed
wants to merge 1 commit into from

2 participants

@markomarkovic

"reguired" changed to "required".

Editor also removed leading whitespace on empty lines.

@predominant
Owner

Thanks for the correction. Cherry-picked to 1.3, and ported to 1.2

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 30, 2010
  1. @markomarkovic
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 8 deletions.
  1. +8 −8 cake/libs/controller/components/cookie.php
View
16 cake/libs/controller/components/cookie.php
@@ -184,7 +184,7 @@ function startup() {
/**
* Write a value to the $_COOKIE[$key];
*
- * Optional [Name.], reguired key, optional $value, optional $encrypt, optional $expires
+ * Optional [Name.], required key, optional $value, optional $encrypt, optional $expires
* $this->Cookie->write('[Name.]key, $value);
*
* By default all values are encrypted.
@@ -205,7 +205,7 @@ function write($key, $value = null, $encrypt = true, $expires = null) {
}
$this->__encrypted = $encrypt;
$this->__expire($expires);
-
+
if (!is_array($key)) {
$key = array($key => $value);
}
@@ -214,7 +214,7 @@ function write($key, $value = null, $encrypt = true, $expires = null) {
if (strpos($name, '.') === false) {
$this->__values[$name] = $value;
$this->__write("[$name]", $value);
-
+
} else {
$names = explode('.', $name, 2);
if (!isset($this->__values[$names[0]])) {
@@ -230,7 +230,7 @@ function write($key, $value = null, $encrypt = true, $expires = null) {
/**
* Read the value of the $_COOKIE[$key];
*
- * Optional [Name.], reguired key
+ * Optional [Name.], required key
* $this->Cookie->read(Name.key);
*
* @param mixed $key Key of the value to be obtained. If none specified, obtain map key => values
@@ -245,7 +245,7 @@ function read($key = null) {
if (is_null($key)) {
return $this->__values;
}
-
+
if (strpos($key, '.') !== false) {
$names = explode('.', $key, 2);
$key = $names[0];
@@ -263,7 +263,7 @@ function read($key = null) {
/**
* Delete a cookie value
*
- * Optional [Name.], reguired key
+ * Optional [Name.], required key
* $this->Cookie->read('Name.key);
*
* You must use this method before any output is sent to the browser.
@@ -344,11 +344,11 @@ function __expire($expires = null) {
return $this->__expires;
}
$this->__reset = $this->__expires;
-
+
if ($expires == 0) {
return $this->__expires = 0;
}
-
+
if (is_integer($expires) || is_numeric($expires)) {
return $this->__expires = $now + intval($expires);
}
Something went wrong with that request. Please try again.