Skip to content

Commit 42f9f8e

Browse files
committed
Fixing strict errors.
While this is a minor API change, its required to make CakePHP pass E_STRICT in testing.
1 parent 0a0a099 commit 42f9f8e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/Cake/View/Helper/JsBaseEngineHelper.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ public function object($data = array(), $options = array()) {
154154
* @param boolean $quoteString If false, leaves string values unquoted
155155
* @return string a JavaScript-safe/JSON representation of $val
156156
*/
157-
public function value($val, $quoteString = true) {
157+
public function value($val = array(), $quoteString = null, $key = 'value') {
158+
if ($quoteString === null) {
159+
$quoteString = true;
160+
}
158161
switch (true) {
159162
case (is_array($val) || is_object($val)):
160163
$val = $this->object($val);
@@ -598,4 +601,4 @@ protected function _toQuerystring($parameters) {
598601
}
599602
return $out;
600603
}
601-
}
604+
}

lib/Cake/View/Helper/JsHelper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ public function __call($method, $params) {
160160
* @param boolean $quoteString If false, leaves string values unquoted
161161
* @return string a JavaScript-safe/JSON representation of $val
162162
**/
163-
public function value($val, $quoteString = true) {
163+
public function value($val = array(), $quoteString = null, $key = 'value') {
164+
if ($quoteString === null) {
165+
$quoteString = true;
166+
}
164167
return $this->{$this->_engineName}->value($val, $quoteString);
165168
}
166169

0 commit comments

Comments
 (0)