Skip to:
Content

bbPress.org

Opened 10 years ago

Closed 8 years ago

#2733 closed defect (bug) (fixed)

Importer: reading undefined array index with 'is_null()'

Reported by: offereins's profile Offereins Owned by: netweb's profile netweb
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.4
Component: API - Importers Keywords: has-patch commit
Cc:

Description

While importing a phpBB forum with version 2.5.4 the following error appears repeatedly:

Notice: Undefined index: to_fieldname in \wp-content\plugins\bbpress\includes\admin\converter.php on line 898

I'm not sure if this is related to the fact that, previous to this point, I removed all plugin data with a bbPress reset, as well as that the import was interrupted and restarted with a purge.

Guessing this is probably not phpBB related, so suggested is to check the array value with isset() and replace the ! is_null() check, since isset() also returns false when the value equals to null. Patch for trunk attached.

Attachments (2)

converter.php-replace-is_null.diff (756 bytes) - added by Offereins 10 years ago.
Replace is_null with isset
2733.2.patch (607 bytes) - added by thebrandonallen 8 years ago.

Download all attachments as: .zip

Change History (4)

@Offereins
10 years ago

Replace is_null with isset

#1 @thebrandonallen
8 years ago

  • Keywords has-patch commit added
  • Milestone changed from Awaiting Review to 2.6

Good catch @Offereins! Adding fresh patch against trunk.

#2 @netweb
8 years ago

  • Owner set to netweb
  • Resolution set to fixed
  • Status changed from new to closed

In 6041:

Importers: In BBP_Converter_Base::convert_table() method use isset() rather than ! is_null

Props Offereins
Fixes #2733

Note: See TracTickets for help on using tickets.