Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing strict errors.

While this is a minor API change, its required to
make CakePHP pass E_STRICT in testing.
  • Loading branch information...
commit 42f9f8e2c3329d44d64ea4fb9e93946fe79b7f79 1 parent 0a0a099
Mark Story markstory authored
7 lib/Cake/View/Helper/JsBaseEngineHelper.php
View
@@ -154,7 +154,10 @@ public function object($data = array(), $options = array()) {
* @param boolean $quoteString If false, leaves string values unquoted
* @return string a JavaScript-safe/JSON representation of $val
*/
- public function value($val, $quoteString = true) {
+ public function value($val = array(), $quoteString = null, $key = 'value') {
+ if ($quoteString === null) {
+ $quoteString = true;
+ }
switch (true) {
case (is_array($val) || is_object($val)):
$val = $this->object($val);
@@ -598,4 +601,4 @@ protected function _toQuerystring($parameters) {
}
return $out;
}
-}
+}
5 lib/Cake/View/Helper/JsHelper.php
View
@@ -160,7 +160,10 @@ public function __call($method, $params) {
* @param boolean $quoteString If false, leaves string values unquoted
* @return string a JavaScript-safe/JSON representation of $val
**/
- public function value($val, $quoteString = true) {
+ public function value($val = array(), $quoteString = null, $key = 'value') {
+ if ($quoteString === null) {
+ $quoteString = true;
+ }
return $this->{$this->_engineName}->value($val, $quoteString);
}
Please sign in to comment.
Something went wrong with that request. Please try again.