ID: 16947 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: *General Issues Operating System: SunOS 5.8 Generic_108528- PHP Version: 4.1.2 New Comment:
>The bug system is not the appropriate forum for asking support >questions. For a list of a range of more appropriate places to ask >for help using PHP, please visit http://www.php.net/support.php fuck off Previous Comments: ------------------------------------------------------------------------ [2002-05-02 11:06:09] [EMAIL PROTECTED] >The bug system is not the appropriate forum for asking support >questions. For a list of a range of more appropriate places to ask >for help using PHP, please visit http://www.php.net/support.php fuck off ------------------------------------------------------------------------ [2002-05-02 08:55:25] [EMAIL PROTECTED] The bug system is not the appropriate forum for asking support questions. For a list of a range of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php ------------------------------------------------------------------------ [2002-05-01 15:34:17] [EMAIL PROTECTED] checked the os with phpinfo() ------------------------------------------------------------------------ [2002-05-01 15:24:17] [EMAIL PROTECTED] three test results... ----test case html---- <html> <head> <title>Filter Test</title> </head> <body bgcolor="#ffffff"> <?php $input_to_test = "Here are some words. here is a naughty words. Some final ending content."; require("includes/old_filter.php"); $my_filter = new Filter("word_files/basicwords.txt"); $my_filter -> approve($input_to_test); $v = $my_filter ->getViolatingContent(); echo "<H4>Violating</H4>"; for($i=0;$i<count($v);$i++){ printf("%s<br>",$v[$i]); } echo "<h4>Keywords</h4>"; $keywords = $my_filter ->getKeywords($input_to_test); for($i=0;$i<count($keywords);$i++){ printf("%s<br>",$keywords[$i]); } ?> </body> </html> TEST #1 ---- changing code as you suggested ----- $this->violations = $violation_arr; $this->keywords = $keyword_arr; produces the following output Violating Keywords 0 TEST #2 ---- my posted code----- $this->$violations = $violation_arr; $this->$keywords = $keyword_arr; produces the following output Violating words. naughty words. final ending content. Keywords 0words. naughty words. final ending content. TEST #3 ---- using my code but inverting the two assignment statements----- $this->$keywords = $keyword_arr; $this->$violations = $violation_arr; produces the following output Violating naughty Keywords 0naughty again i remain pretty convinced this is some sort of bug... ------------------------------------------------------------------------ [2002-05-01 15:03:25] [EMAIL PROTECTED] Looking at your code, your assigning $this->$violations which is very different from $this->violations (NOTICE: the dollar sign AFTER the arrow). At the time of assignment, the $violations, is an empty var even. So what would happen is that $this->=$arr_violations. If that does anything usefull, it would probably be, something like: foreach($violations as $key => $value) { $this->$key=$value; } The object would then get property '0', '1','2' etc. But that is more speculation than fact, because what you're trying to do here is incorrect. use: $this->violations=$arr_violations; then report back. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/16947 -- Edit this bug report at http://bugs.php.net/?id=16947&edit=1