summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel_generate/image.devel_generate.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/devel_generate/image.devel_generate.inc b/devel_generate/image.devel_generate.inc
index 8c5b280..2c6318a 100644
--- a/devel_generate/image.devel_generate.inc
+++ b/devel_generate/image.devel_generate.inc
@@ -26,6 +26,7 @@ function _image_devel_generate($object, $field, $instance, $bundle) {
// Generate a max of 5 different images.
if (!isset($images[$extension][$min_resolution][$max_resolution]) || count($images[$extension][$min_resolution][$max_resolution]) <= DEVEL_GENERATE_IMAGE_MAX) {
if ($path = devel_generate_image($extension, $min_resolution, $max_resolution)) {
+ $source = new stdClass();
$source->uri = $path;
$source->uid = 1; // TODO: randomize? Use case specific.
$source->filemime = 'image/' . pathinfo($path, PATHINFO_EXTENSION);
@@ -41,6 +42,7 @@ function _image_devel_generate($object, $field, $instance, $bundle) {
}
else {
// Select one of the images we've already generated for this field.
+ $file = new stdClass();
$file->fid = array_rand($images[$extension][$min_resolution][$max_resolution]);
}