interconnectit / Search-Replace-DB

This script was made to aid the process of migrating PHP and MySQL based websites. Works with most common CMSes.
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
GNU General Public License v3.0
3.99k stars 851 forks source link

PHP notices: a non well formed numeric value + more #263

Closed mario6097 closed 4 years ago

mario6097 commented 5 years ago

Hi

I just discovered that I get the following warnings:

PHP Notice: A non well formed numeric value encountered in /.../Search-Replace-DB-master/srdb.cli.php on line 197

PHP Notice: icit_srdb::recursive_unserialize_replace(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Requests_Utility_CaseInsensitiveDictionary" of the object you are trying to operate on was loaded before unserialize() gets called or provide an autoloader to load the class definition in /.../Search-Replace-DB-master/srdb.class.php on line 755

PHP Notice: A non well formed numeric value encountered in /.../Search-Replace-DB-master/srdb.cli.php on line 202

I am on a Linux Debian-91-stretch-64-LAMP 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux

php -v PHP 7.2.13-1+0~20181207100540.13+stretch~1.gbpf57305 (cli) (built: Dec 7 2018 10:05:40) ( NTS )

masiorama commented 4 years ago

I solved the first problem and the latter PHP Notice: A non well formed numeric value encountered in /.../Search-Replace-DB-master/srdb.cli.php on line 202 casting type to float in front of the variables involved:

$time = number_format( (float) $report[ 'end' ] - (float) $report[ 'start' ], 8 );

I solved the second problem following #251

gianluigi-icit commented 4 years ago

the code was merged in the new release