Strict warning: Non-static method NodeSaveTestCase::getInfo() cannot be called statically in simpletest_categorize_tests() (line 257 of C:\www\webapps\drupal-7\modules\simpletest\simpletest.module).

Comments

brianV’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new681 bytes

The getInfo() function was not declared as 'public static'. Trivial patch, setting to RTBC myself.

brianV’s picture

Assigned: Unassigned » brianV
boombatower’s picture

The node.test recently changed?

Otherwise this is correct change.

nancydru’s picture

Status: Reviewed & tested by the community » Needs work

# trict warning: Non-static method OpenIDFunctionalTest::getInfo() cannot be called statically in simpletest_categorize_tests() (line 257 of C:\www\webapps\drupal-7\modules\simpletest\simpletest.module).
# Strict warning: Non-static method OpenIDFunctionalTest::getInfo() cannot be called statically in simpletest_categorize_tests() (line 257 of C:\www\webapps\drupal-7\modules\simpletest\simpletest.module).
# Strict warning: Non-static method OpenIDUnitTest::getInfo() cannot be called statically in simpletest_categorize_tests() (line 257 of C:\www\webapps\drupal-7\modules\simpletest\simpletest.module).
# Strict warning: Non-static method OpenIDUnitTest::getInfo() cannot be called statically in simpletest_categorize_tests() (line 257 of C:\www\webapps\drupal-7\modules\simpletest\simpletest.module).
# Strict warning: Non-static method FormsFormStorageTestCase::getInfo() cannot be called statically in simpletest_categorize_tests() (line 257 of C:\www\webapps\drupal-7\modules\simpletest\simpletest.module).
# Strict warning: Non-static method FormsFormStorageTestCase::getInfo() cannot be called statically in simpletest_categorize_tests() (line 257 of C:\www\webapps\drupal-7\modules\simpletest\simpletest.module).
# Strict warning: Non-static method TemplateUnitTest::getInfo() cannot be called statically in simpletest_categorize_tests() (line 257 of C:\www\webapps\drupal-7\modules\simpletest\simpletest.module).
# Strict warning: Non-static method TemplateUnitTest::getInfo() cannot be called statically in simpletest_categorize_tests() (line 257 of C:\www\webapps\drupal-7\modules\simpletest\simpletest.module).
# Strict warning: Non-static method UserSaveTestCase::getInfo() cannot be called statically in simpletest_categorize_tests() (line 257 of C:\www\webapps\drupal-7\modules\simpletest\simpletest.module).
# Strict warning: Non-static method UserSaveTestCase::getInfo() cannot be called statically in simpletest_categorize_tests() (line 257 of C:\www\webapps\drupal-7\modules\simpletest\simpletest.module).

brianV’s picture

Just grepped core, and found several more instances where the getInfo function needs to be set statically. Will post a more complete patch soon.

brianV’s picture

Title: Strict warning » getInfo() not declared as static for various core tests
Status: Needs work » Needs review
StatusFileSize
new3.72 KB

This patch should take care of all the copies of this across core.

@boombatower - the one in node.test was introduced in #303965: Enhanced data import - node_save() and user_save()

boombatower’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

nancydru’s picture

+1. Should be committed ASAP.

catch’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Sorry folks, this is an /exact/ duplicate of #453962: static getInfo methods posted 9 hours before this one.