Skip to content

Commit

Permalink
Added test file for bug #31177 (not fixed yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Jun 10, 2005
1 parent dc95b1b commit 4796fc9
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions Zend/tests/bug31177.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
--TEST--
Bug #31177 (Memory leak)
--FILE--
<?php
class DbGow {

public function query() {
throw new Exception;
}

public function select() {
return new DbGowRecordSet($this->query());
}

public function select2() {
new DbGowRecordSet($this->query());
}

}

class DbGowRecordSet {

public function __construct($resource) {
}

}

$db = new DbGow;

try {
$rs = $db->select();
} catch(Exception $e) {
echo "ok\n";
}

try {
$db->select2();
} catch(Exception $e) {
echo "ok\n";
}
?>
--EXPECT--
ok
ok

0 comments on commit 4796fc9

Please sign in to comment.