Updated: Comment 0

Problem/Motivation

Attribute::value() uses a non existing property called value, so a notice happens. This method is not used anywhere in core.

  /**
   * Returns the whole array.
   */
  public function value() {
    return $this->value;
  }

Proposed resolution

  • Rename the method.
  • Write proper tests.

Remaining tasks

User interface changes

API changes

Files: 
CommentFileSizeAuthor
#3 attribute-2083941-3.patch5.26 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 58,937 pass(es).
[ View ]
#3 interdiff.txt776 bytesdawehner
#1 template-attribute-2083941-1.patch5.26 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] 58,533 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Comments

Status:Active» Needs review
Issue tags:+phpunit
StatusFileSize
new5.26 KB
FAILED: [[SimpleTest]]: [MySQL] 58,533 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

There we go.

Status:Needs review» Needs work

The last submitted patch, template-attribute-2083941-1.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new776 bytes
new5.26 KB
PASSED: [[SimpleTest]]: [MySQL] 58,937 pass(es).
[ View ]

That was the only I didn't tried whether it passes.

Status:Needs review» Reviewed & tested by the community
Issue tags:+Quick fix

Looks good to me.

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.