#2987 closed defect (bug) (fixed)
PHP 7.1 & PHP "Nightly" error: [] operator not supported for strings
Reported by: | netweb | Owned by: | netweb |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | commit has-patch |
Cc: |
Description
bbPress is currently seeing 3 instances of the error [] operator not supported for strings
on PHP 7.1 and PHP "nightly" jobs on Travis CI
- PHP 7.1: https://travis-ci.org/ntwb/bbPress/jobs/156094048
- PHP "Nightly": https://travis-ci.org/ntwb/bbPress/jobs/156094051
There were 3 errors: 1) BBP_Tests_Forums_Template_Forum::test_bbp_get_forum_permalink Error: [] operator not supported for strings /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:2250 /tmp/wordpress/src/wp-includes/plugin.php:602 /tmp/wordpress/src/wp-includes/class-wp-query.php:1682 /tmp/wordpress/src/wp-includes/class-wp-query.php:3238 /tmp/wordpress/src/wp-includes/post.php:1595 /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:1527 /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:1946 /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:73 /tmp/wordpress/src/wp-content/plugins/bbPress/tests/phpunit/includes/factory.php:31 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php:32 /tmp/wordpress/src/wp-content/plugins/bbPress/tests/phpunit/testcases/forums/template/forum.php:87 2) BBP_Tests_Forums_Template_Visibility::test_bbp_get_forum_visibility Error: [] operator not supported for strings /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:2250 /tmp/wordpress/src/wp-includes/plugin.php:602 /tmp/wordpress/src/wp-includes/class-wp-query.php:1682 /tmp/wordpress/src/wp-includes/class-wp-query.php:3238 /tmp/wordpress/src/wp-includes/post.php:1595 /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:1527 /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:1946 /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:73 /tmp/wordpress/src/wp-content/plugins/bbPress/tests/phpunit/includes/factory.php:31 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php:32 /tmp/wordpress/src/wp-content/plugins/bbPress/tests/phpunit/testcases/forums/template/visibility.php:28 3) BBP_Tests_Forums_Template_Visibility::test_bbp_is_forum_visibility Error: [] operator not supported for strings /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:2250 /tmp/wordpress/src/wp-includes/plugin.php:602 /tmp/wordpress/src/wp-includes/class-wp-query.php:1682 /tmp/wordpress/src/wp-includes/class-wp-query.php:3238 /tmp/wordpress/src/wp-includes/post.php:1595 /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:1527 /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:1946 /tmp/wordpress/src/wp-content/plugins/bbPress/src/includes/forums/functions.php:73 /tmp/wordpress/src/wp-content/plugins/bbPress/tests/phpunit/includes/factory.php:31 /tmp/wordpress/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php:32 /tmp/wordpress/src/wp-content/plugins/bbPress/tests/phpunit/testcases/forums/template/visibility.php:52
Attachments (1)
Change History (8)
#2
@
8 years ago
- Keywords commit has-patch added
- Milestone changed from Awaiting Review to 2.6
WP_Query:get()
defaults to returning an empty string if the requested key isn't set. However, you can pass a default return value. Attached patch sets the default return to an empty array. Tests now pass.
#3
@
8 years ago
- Owner set to netweb
- Resolution set to fixed
- Status changed from new to closed
In 6113:
#5
@
8 years ago
Merged r6212 upstream into bbPress' fork of NBBC https://github.com/bbpress/NBBC/pull/1
Note: See
TracTickets for help on using
tickets.
Related: #2973