flychen50 / phpquery

Automatically exported from code.google.com/p/phpquery
0 stars 0 forks source link

phpQuery::unloadDocuments() bug #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
phpQuery::unloadDocuments() has a fatal error when attempting to free all
documents without specifying id:

Fatal error: Attempt to unset static property phpQuery::$documents in
phpQuery.php on line 490

What steps will reproduce the problem?
1. phpQuery::newDocument('<div/>');
2. phpQuery::unloadDocuments();

What is the expected output?
Expected document objects unset...

What do you see instead?
Fatal error

What version of the product are you using? On what operating system?
0.9.5 beta4

Please provide any additional information below.

the code should be:

foreach(phpQuery::$documents as $k => $v) {
   unset(phpQuery::$documents[$k]);
}

Original issue reported on code.google.com by sna...@gmail.com on 15 Dec 2008 at 6:09

GoogleCodeExporter commented 9 years ago

Original comment by tobiasz....@gmail.com on 15 Dec 2008 at 10:55

GoogleCodeExporter commented 9 years ago
Fixed in r342. Thx for the patch.

Original comment by tobiasz....@gmail.com on 17 Dec 2008 at 2:14

GoogleCodeExporter commented 9 years ago

Original comment by tobiasz....@gmail.com on 1 Jan 2009 at 10:37