wp-migrate-db icon indicating copy to clipboard operation
wp-migrate-db copied to clipboard

array_search() expects parameter 2 to be array

Open ylkyrg opened this issue 4 years ago • 1 comments

Warnings and notices are thrown when using wp migratedb export without the optional --find and --replace flags with PHP 7.4 and WP Migrate DB 2.2..

Notice: Undefined index: replace_old in [...]/plugins/wp-migrate-db/class/Common/Sql/Table.php on line 1909
Warning: array_search() expects parameter 2 to be array, null given in [...]/plugins/wp-migrate-db/class/Common/Sql/Table.php on line 1909
Notice: Undefined index: replace_new in [...]/plugins/wp-migrate-db/class/Common/Sql/Table.php on line 1912
Notice: Trying to access array offset on value of type null in [...]/plugins/wp-migrate-db/class/Common/Sql/Table.php on line 1912
Warning: Invalid argument supplied for foreach() in [...]/plugins/wp-migrate-db/class/Common/Replace.php on line 272

ylkyrg avatar Nov 18 '21 08:11 ylkyrg

Hey @ylkyrg, thanks for this report. These notices should be resolved in the next release.

kevinwhoffman avatar Nov 26 '21 14:11 kevinwhoffman