|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-06-04 15:26 UTC] dtajchreber@php.net
-Status: Open
+Status: Bogus
[2011-06-04 15:26 UTC] dtajchreber@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 18:00:01 2025 UTC |
Description: ------------ I have built an MVC (lightweight MVC) now in this is static class ("cleanData") with method for (POST, GET, URL) and use addSlashes on them, the problem is when i use the return data in the empty function ("Fatal error: Can't use function return value in write context") Test script: --------------- class cleanData{ public static function GET($key){ return addslashes($_GET[$key]); } } if(empty(cleanData::GET("test"))){ echo "empty"; }else{ echo cleanData::GET("test"); } Expected result: ---------------- if loaded with ?test=1 i should see 1 on output, if loaded with ?test=, or without test in url i should see empty Actual result: -------------- Fatal error: Can't use function return value in write context