Anonymous | Login | Signup for a new account | 12-17-2024 10:47 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002543 | [Quercus] | major | always | 03-20-08 18:50 | 03-21-08 13:19 | ||||
Reporter | ckchris | View Status | public | ||||||
Assigned To | nam | ||||||||
Priority | normal | Resolution | fixed | Platform | |||||
Status | closed | OS | |||||||
Projection | none | OS Version | |||||||
ETA | none | Fixed in Version | 3.1.6 | Product Version | 3.1.5 | ||||
Product Build | |||||||||
Summary | 0002543: Assignment not working properly? | ||||||||
Description |
This is a direct copy of a function code from phpbb3's includes/functions_content.php, part of the class bitfield: function set($n) { $byte = $n >> 3; $bit = 7 - ($n & 7); if (strlen($this->data) >= $byte + 1) { resin_debug("bit val: " . ord(chr(96) | chr(1))); $vall = $this->data[$byte] | chr(1 << $bit); resin_debug("ord: " . ord($vall)); //$this->data[$byte] = $this->data[$byte] | chr(1 << $bit); $this->data[$byte] = $vall; resin_debug(ord($this->data[$byte])); } else { $this->data .= str_repeat("\0", $byte - strlen($this->data)); $this->data .= chr(1 << $bit); } } I have sprinkled some resin debug statements for testing. Input values are: 1, 2, 7 Output of debugging is: [2008/03/20 19:41:02.899] INFO [com.caucho.quercus.lib.MiscModule] bit val: 97 [2008/03/20 19:41:02.900] INFO [com.caucho.quercus.lib.MiscModule] ord: 96 [2008/03/20 19:41:02.901] INFO [com.caucho.quercus.lib.MiscModule] 64 [2008/03/20 19:41:02.901] INFO [com.caucho.quercus.lib.MiscModule] bit val: 97 [2008/03/20 19:41:02.902] INFO [com.caucho.quercus.lib.MiscModule] ord: 65 [2008/03/20 19:41:02.903] INFO [com.caucho.quercus.lib.MiscModule] 64 [2008/03/20 19:41:02.899] INFO [com.caucho.quercus.lib.MiscModule] bit val: 97 [2008/03/20 19:41:02.900] INFO [com.caucho.quercus.lib.MiscModule] ord: 96 [2008/03/20 19:41:02.900] INFO [com.caucho.quercus.lib.MiscModule] 64 [2008/03/20 19:41:02.901] INFO [com.caucho.quercus.lib.MiscModule] bit val: 97 [2008/03/20 19:41:02.902] INFO [com.caucho.quercus.lib.MiscModule] ord: 65 [2008/03/20 19:41:02.903] INFO [com.caucho.quercus.lib.MiscModule] 64 So here's the strange thing. the output of the second statement with "ord: 65" shows the correct value. Yet, when $vall is assigned to $this->data[$byte], the value changed. Is there an assignment problem here? |
||||||||
Steps To Reproduce | |||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
36 total queries executed. 29 unique queries executed. |