Download & Extend

Exported objects added to non-existant array

Project:Chaos tool suite (ctools)
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Any time an object is exported using the BulkExporter it is added to an array that doesn't exist, e.g.:

<?php
<?php
// $Id: $

/**
* @file
* Bulk export of panels_default objects generated by Bulk export module.
*/

/**
* Implementation of hook_default_panels_mini()
*/
function mymodule_default_panels_mini() {
 
$mini = new stdClass;
 
$mini->name = 'thingy';
// ... definition ...
 
$mini->display = $display;
 
$minis['thingy'] = $mini;

return
$minis;
}
?>

As you can see above the $mini object is added to the $minis array, but $minis was never defined.

Also, there's only one space before the 'return' command.

Comments

#1

Status:active» needs review

Here's a quick patch to resolve these two issues.

AttachmentSize
ctools-n625696.patch 1.1 KB

#2

Status:needs review» fixed

I'm not sure it's really necessary to define that array; no notices are thrown when adding specific items to undefined variables. Still it makes sense. Besides the missing two spaces really should be in there.

Committed.

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here