fantomel Posted May 6, 2009 Share Posted May 6, 2009 Hello people i'm having some troubles with some functions from a class can someone please help me ? ok this is how i run the functions <php function __construct() { $this->SetReporting(); $this->RemoveMagicQuotes(); } ?> and this is the code where i'm having trouble <? private function StripSlashesDeep($value) { $value = is_array($value) ? array_map('StripSlashesDeep', $value) : stripslashes($value); return $value; } private function RemoveMagicQuotes() { if (get_magic_quotes_gpc()) { $_GET = StripSlashesDeep($_GET); // the line where i'm having errors $_POST = StripSlashesDeep($_POST); $_COOKIE = StripSlashesDeep($_COOKIE); } } ?> the error: Fatal error: Call to undefined function stripslashesdeep() in C:\xampp\htdocs\Front.php on line 122 // i have posted a comment on the line where the error is Link to comment https://forums.phpfreaks.com/topic/157134-help-with-php-ooop-functions/ Share on other sites More sharing options...
jackpf Posted May 6, 2009 Share Posted May 6, 2009 You need to use $this, as the function is in the same class. And it's oop, not ooop Link to comment https://forums.phpfreaks.com/topic/157134-help-with-php-ooop-functions/#findComment-827918 Share on other sites More sharing options...
Ken2k7 Posted May 6, 2009 Share Posted May 6, 2009 I sure hope that array_map works. Link to comment https://forums.phpfreaks.com/topic/157134-help-with-php-ooop-functions/#findComment-827941 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.