user-otp icon indicating copy to clipboard operation
user-otp copied to clipboard

After upgrade to OC8.2: Class 'OC_Log' not found

Open sorenweber opened this issue 9 years ago • 1 comments

Hi,

I just upgraded to ownCloud 8.2 from the latest 8.1.4 (which worked for me). Now, I get the error in /var/www/owncloud/data/owncloud.log:

Class 'OC_Log' not found at /var/www/owncloud/apps/user_otp/lib/otp.php#223

I found that the class had been removed. Without knowing much, I read the owncloud/core commit titled Remove OC_Log and saw that I could change

OC_Log::write('OC_USER_OTP', $name.'().', OC_Log::DEBUG);

to

OCP\Util::writeLog('OC_USER_OTP', $name.'().', OCP\Util::DEBUG);

And similar whenever OC_Log was used. After this change everything is working. Unfortunately I am not proficient in git etc. so I cannot submit a change myself (also I appear not to be allowed to attach the changed otp.php). Sorry.

sorenweber avatar Oct 21 '15 13:10 sorenweber

Thx. Attached a diff file for all changes in otp.php

user_otp.txt

oberlon avatar Nov 19 '15 16:11 oberlon