#1946 - Stack trace in admin_addons module
| Identifier | #1946 |
|---|---|
| Issue type | Minor issue (breaks specific functionality) |
| Title | Stack trace in admin_addons module |
| Status | Completed |
| Handling member | Chris Graham |
| Addon | General / Uncategorised |
| Description | Going to Adminzone>Structure>Addons results in a stack trace:
An error has occurred PHP WARNING [2] implode() [<a href='http://www.php.net/manual/en/function.implode.php'>function.implode.php</a>]: Invalid arguments passed in adminzone\pages\modules\admin_addons.php on line 410 (version: 10 alpha1, PHP version: 5.6.8, URL: /composr/adminzone/index.php?page=admin_addons) Here is the stack trace: Below is a stack trace revealing the state the software was in when the error occurred. If this represents a bug in the unmodified software, you may want to check Composr website for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, what you tried to do, how you tried to do it, version numbers, and any other appropriate information. We apologise for this problem and if it's a bug we hope you will work with us so that we can fix it for you promptly. File 'E:\\xampp\\htdocs\\composr\\sources\\failure.php' Line 962 Function 'get_html_trace' Args File 'E:\\xampp\\htdocs\\composr\\sources\\global2.php' Line 872 Function '_fatal_exit' Args 'PHP WARNING [2] implode() [function.implode.php]: Invalid arguments passed in adminzone\\pages\\modules\\admin_addons.php on line 410' File 'E:\\xampp\\htdocs\\composr\\sources\\failure.php' Line 257 Function 'fatal_exit' Args 'PHP WARNING [2] implode() [function.implode.php]: Invalid arguments passed in adminzone\\pages\\modules\\admin_addons.php on line 410' File 'E:\\xampp\\htdocs\\composr\\sources\\global2.php' Line 745 Function '_composr_error_handler' Args 'warning' 2 'implode() [function.implode.php]: Invalid arguments passed' 'adminzone\\pages\\modules\\admin_addons.php' 410 5 Function 'composr_error_handler' Args 2 'implode() [function.implode.php]: Invalid arguments passed' 'E:\\xampp\\htdocs\\composr\\adminzone\\pages\\modules\\admin_addons.php' 410 array File 'E:\\xampp\\htdocs\\composr\\adminzone\\pages\\modules\\admin_addons.php' Line 410 Function 'implode' Args '\n' '' I shortened the stack trace to where the error occurred at line 410 of admin_addons.php. It looks like it's failing with the Copyright Attribution data where implode() is expecting $addon['copyright_attribution'] to be an array, but it isn't. |
| Steps to reproduce | |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
if (!empty($info['copyright_attribution'])) {
$info['copyright_attribution'] = explode("\n", $info['copyright_attribution']);
}
so it looks like this:
if (!empty($info['copyright_attribution'])) {
$info['copyright_attribution'] = explode("\n", $info['copyright_attribution']);
} else {
$info['copyright_attribution'] = array ();
}
I just ran into a similar stack trace when re-installing a previously installed addon and used the same fix in the inform_about_addon_install() function in sources\addons2.php.
I created a pull request for it, and a small cosmetic fix for the side_printer_friendly block.