Skip to content
Browse files

Fix 'undefined function' errors when casting get and post variables t…

…o string
  • Loading branch information...
1 parent d3fe197 commit 90bcdc09bbb91482b392f04c9c3d2b7f44a15905 @johnpbloch committed Jun 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Common.php
View
4 Common.php
@@ -130,7 +130,7 @@ function post($key, $default = NULL, $string = FALSE)
{
if(isset($_POST[$key]))
{
- return $string ? str($_POST[$key], $default) : $_POST[$key];
+ return $string ? (string)$_POST[$key] : $_POST[$key];
}
return $default;
}
@@ -149,7 +149,7 @@ function get($key, $default = NULL, $string = FALSE)
{
if(isset($_GET[$key]))
{
- return $string ? str($_GET[$key], $default) : $_GET[$key];
+ return $string ? (string)$_GET[$key] : $_GET[$key];
}
return $default;
}

0 comments on commit 90bcdc0

Please sign in to comment.
Something went wrong with that request. Please try again.