#25052 [Opn->Asn]: printer_get_option() followed by print can change PRINTER_MODE
| From: | arnaud@php.net | Date: | Tue, 12 Aug 2003 12:36:42 +0000 |
| Subject: | #25052 [Opn->Asn]: 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-19564@lists.php.net to get a copy of this message | ||
ID: 25052
Updated by: arnaud@php.net
Reported By: dave at mail dot slh dot wisc dot edu
-Status: Open
+Status: Assigned
Bug Type: PEAR related
Operating System: windows 2000
PHP Version: 4.3.3RC3
-Assigned To:
+Assigned To: fmk
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