Permalink
Browse files

Merge pull request #25 from johnpbloch/strfix

Fix 'undefined function' errors when casting get and post variables to string
  • Loading branch information...
2 parents d3fe197 + 90bcdc0 commit 0e8cc234eebd4e1f6d7cafe309a508ac5ddbe0a8 @Xeoncross committed Jun 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Common.php
View
@@ -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 0e8cc23

Please sign in to comment.