#25052 [Asn->Csd]: printer_get_option() followed by print can change PRINTER_MODE

From: Date: Tue, 02 Dec 2003 23:00:52 +0000
Subject: #25052 [Asn->Csd]: printer_get_option() followed by print can change PRINTER_MODE
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24065@lists.php.net to get a copy of this message
ID: 25052 Updated by: fmk@php.net Reported By: dave at mail dot slh dot wisc dot edu -Status: Assigned +Status: Closed Bug Type: PECL related Operating System: windows 2000 PHP Version: 4.3.3RC3 Assigned To: fmk New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Problem with sstatic and dynamic alocated strings in the same variable Previous Comments: ------------------------------------------------------------------------ [2003-08-12 07:26:48] iliaa@php.net printer extension is part of the PECL repository. ------------------------------------------------------------------------ [2003-08-12 07:12:27] dave at mail dot slh dot wisc dot edu Description: ------------ Using printer_get_option() to view printer mode setting can cause the value of PRINTER_MODE to be altered. Reproduce code: --------------- <?php $handle=printer_open('myprinter'); printer_set_option ($handle,PRINTER_MODE,"RAW"); print "<br>PRINTER_MODE " . printer_get_option($handle, PRINTER_MODE) . "<br>"; print "handle=$handle"; print "<br>PRINTER_MODE " . printer_get_option($handle, PRINTER_MODE) . "<br>"; printer_write($handle,"this is a test"); printer_close($handle); ?> Expected result: ---------------- PRINTER_MODE RAW handle=Resource id #2 PRINTER_MODE RAW Actual result: -------------- PRINTER_MODE RAW handle=Resource id #2 PRINTER_MODE handle= Warning: couldn't allocate the printerjob [1804] in d:\foo\printest2.php on line 7 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25052&edit=1

« previous php.pear.dev (#24065) next »