Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14004241
D11908.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1019 B
Referenced Files
None
Subscribers
None
D11908.diff
View Options
diff --git a/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php b/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php
--- a/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php
+++ b/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php
@@ -90,11 +90,14 @@
$rand_images = array();
$quantity = rand(2, 10);
$quantity = min($quantity, count($images));
- foreach (array_rand($images, $quantity) as $random) {
- $rand_images[] = $images[$random]->getPHID();
+
+ if ($quantity) {
+ foreach (array_rand($images, $quantity) as $random) {
+ $rand_images[] = $images[$random]->getPHID();
+ }
}
- // this means you don't have any jpegs yet. we'll
- // just use a builtin image
+
+ // This means you don't have any JPEGs yet. We'll just use a built-in image.
if (empty($rand_images)) {
$default = PhabricatorFile::loadBuiltin(
PhabricatorUser::getOmnipotentUser(),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 27, 5:20 PM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6737162
Default Alt Text
D11908.diff (1019 B)
Attached To
Mode
D11908: Minor fix for `lipsum generate`
Attached
Detach File
Event Timeline
Log In to Comment