Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.3

Bug #5255 Instantiating the class kills the page
Submitted: 2005-08-31 12:54 UTC
From: blcdhq at gmail dot com Assigned: olivierg
Status: Closed Package: Structures_DataGrid
PHP Version: 4.3.11 OS: Linux 2.2.24-7.0.3
Roadmaps: (Not assigned)    
Subscription  


 [2005-08-31 12:54 UTC] blcdhq at gmail dot com
Description: ------------ I installed DataGrid 0.6.2 with alldeps with the pear installer. The quick example does not work with a valid Query. When I am instantiating the class, Php seems to crash and nothing, not even errors are put out. The test #2 is never echoed out, and execution is stopped on the instatiation line. <?php require('Structures/DataGrid.php'); echo "test #1<br />"; $dg =& new Structures_DataGrid(); echo "test #2<br />"; // Get my data $result = $db->query('SELECT * FROM members'); // Bind to DataGrid $data = Structures_DataGrid_DataSource::create($result); $dg->bindDataSource($data); // Print the DataGrid $dg->render(); ?> Expected result: ---------------- seeing "test #2" printed to the browser Actual result: -------------- the document is empty, as in "0 Bytes"

Comments

 [2005-08-31 13:04 UTC] blcdhq at gmail dot com
sorry, the document is not empty, but contains test#1<br /> then, execution stops
 [2005-09-04 20:28 UTC] post at mark-wiesemann dot de
Please check whether the packages OLE, HTML_Table and Pager are installed.
 [2005-09-12 13:56 UTC] asnagy at php dot net
As Mark suggested, this happens when HTML_Table is not installed, please check this.
 [2005-10-10 23:57 UTC] olivierg at php dot net
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. It does not "kill the page", it just fails silently. This was due to the @include_once() call, within Renderer::setRenderer(). The problem happened when this call included some file which itself used the require construct. As in : Renderer::setRenderer() --> @include_once() --> require() The require() cause a fatal error, but this error is not displayed due to the @ operator that's prepended to include_once() call. So, with missing dependencies, it just turned into a silent bug, which is not acceptable. I simply removed this useless @ operator. Missing dependencies will now cause useful messages to be displayed, helping developers to get the job done.