Page MenuHomePhabricator

$this in static methods PFUploadWindow::getInitialPageText() and PFUploadWindow::getExistsWarning()
Closed, InvalidPublicBUG REPORT

Description

To reproduce, using release 1.35, create a form with an uploadable field, and upload a file with it, specifying a license.

Then an error Using $this in static context will appear.

It affects, at least, lines 483, 485, 491, 493 of PFUploadWindow::getInitialPageText(). Perhaps, this method should not be static.

UPD: also affected: PFUploadWindow::getExistsWarning(), lines 637, 640, 642, 646, 652, 668.

Event Timeline

alex-mashin renamed this task from $this in static method PFUploadWindow::getInitialPageText() to $this in static methods PFUploadWindow::getInitialPageText() and PFUploadWindow::getExistsWarning().Aug 21 2023, 8:25 AM

It sounds like you are using the REL1_35 branch of Page Forms. You should switch to the most recent version of Page Forms, which thankfully still supports MW 1.35 - I think this particular bug, or set of bugs, was fixed a long time ago.

It sounds like you are using the REL1_35 branch of Page Forms. You should switch to the most recent version of Page Forms, which thankfully still supports MW 1.35 - I think this particular bug, or set of bugs, was fixed a long time ago.

Thank you, switching to master helped.