Notifications
Clear all

More PHP7.4 changes for efic 3.5.3

2 Posts
2 Users
0 Reactions
423 Views
(@hobert)
Posts: 61
Trusted Member
Topic starter
 

I've recently had to make some additional changes to my 3.5.3 efiction site to clear up some php errors, so I thought I would post those changes so anyone else can solve some issues. I will update this post if I come up with any more.

includes\get_session_vars.php
Change + to . in both locations (between the email and password)

if($userdata && $userdata['level'] != -1 && $_COOKIE[$sitekey.'_salt'] == md5($userdata['email'].$userdata['password'])) {

to

if($userdata && $userdata['level'] != -1 && $_SESSION[$sitekey.'_salt'] == md5($userdata['email']+$userdata['password'])) {

user\login.php
Change + to . in

$_SESSION[$sitekey."_salt"] = md5($passwd['email']+$encryptedpassword);

to

$_SESSION[$sitekey."_salt"] = md5($passwd['email'].$encryptedpassword);

stories.php
Changed
if(count($stories['coauthors']) > 0) $stories['coauthors'] = 1;
to
if(is_countable($stories['coauthors'])) $stories['coauthors'] = 1;

Changed
if (count($coauthors)) {
to
if (is_countable($coauthors) && count($coauthors) > 0) {

user/manageimages.php
Changed
$this->message = "";
to
$this->message = [];


efiction - 3.5.3
MySql - 5.5.32
php - 5.5.22
Linex - Apache 2.2.17
Hosted by: Fatcow!
http://www.hobert.net/fic/

 
Posted : 25/11/2021 11:59 pm
Topic Tags
(@jimmi)
Posts: 95
Estimable Member
 

Thanks. I can confirm Change + to . in fixes.

But I never seen is_countable() to fix count() issue. Correct fix is to make sure that $coauthors is array (empty too) and not text.

 

Next issue is mistypo in get_session_vars.php 

_agecontsent  instead _ageconsent

 

 

 

 

 


Never say that something is impossible because there will be always some dummy who will do it.
URL for efiction site: https://www.hpfanfiction.cz/
php: 8.1.33 MariaDB 10.5
efic version: 4.0.x
mods: storyimage, notifications, storyend

 
Posted : 27/11/2021 1:47 pm
Share: