Page MenuHomePhabricator

[patchdemo] creating an environment with no extensions, skins, or modules renders patchdemo in a wedged/non-functional state
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • create a new patchdemo demo
  • select "Custom" for the Configuration preset
  • uncheck all options in "Choose included repos"

What happens?:

Error on php.new when creating environment. I do not have the error at hand, but it has something to do with array_diff on a null object

Error on index.php where

  • user cannot create new environment
  • the table of environments is not rendered, instead there's the following error
Fatal error: Uncaught TypeError: array_diff(): Argument #2 must be of type array, null given in /var/www/html/index.php:475 Stack trace: #0 /var/www/html/index.php(475): array_diff() #1 {main} thrown in /var/www/html/index.php on line 475

What should have happened instead?:

Either:

  1. patch demo should gracefully handle demos without any skins, extensions, or modules, or
  2. patch demo should require all demos are created with at least one skin, extension, or module

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Screenshot 2024-09-27 at 2.57.03 PM.png (1×1 px, 205 KB)

Event Timeline

Let's explore option 2 first (i.e. that patchdemo shouldn't fall over when someone makes an environment with nothing selected). We think that the environment should run "fine" both on catalyst and the legacy backend. If this turns out to be false, then we will explore option 1.

SDunlap triaged this task as Unbreak Now! priority.Sep 30 2024, 4:38 PM
SDunlap edited projects, added Catalyst (Camp Muir); removed Catalyst.
SDunlap set the point value for this task to 1.
thcipriani assigned this task to EBomani.