Page MenuHomePhabricator

D11908.diff
No OneTemporary

D11908.diff

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

Mime Type
text/plain
Expires
Mon, Nov 18, 10:38 PM (1 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6737162
Default Alt Text
D11908.diff (1019 B)

Event Timeline