Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
2.2k views
in Q2A Core by
PHP Notice:  Trying to access array offset on value of type null in /home/ruyadaruya.com/public_html/qa-include/pages/question-view.php on line 1131
Q2A version: 1.8.4
by
The first notice is about a similar issue, but this time in a plugin; you need to find out which one is raising this notice.

As for the second one, how often does it happen?
by
second is almost every 15 minutes
by
+1
Please contact your hosting provider, they might be able to fix it for you, or at least they can give your information about it.
by
The session folder is too full. so it made a mistake. the problem was solved when cleaning.

3 Answers

+3 votes
by
selected by
 
Best answer

Hello sonsuz,

For fixing this notice please replace this line:

isset($in['notify']) ? $in['notify'] : qa_opt('notify_users_default'), $in['email'], @$errors['email'], $prefix);

with this one:

isset($in['notify']) ? $in['notify'] : qa_opt('notify_users_default'), @$in['email'], @$errors['email'], $prefix);

in qa-include/pages/question-view.php:1131

Have a nice day!

by
+1
Thank you so much
by
+1
You're welcome!
+3 votes
by

At first I couldn't see what would be causing those notices, but it turns out there were some changes to variable handling in PHP 7.4 that are not mentioned in the normal PHP changelog page.

I set up a PHP 7.4 install and managed to replicate the notices, so I've fixed them. The changes have been posted above already, but here is the diff on GitHub.

Will release Q2A 1.8.5 with these changes in the next few days.

0 votes
by

There is also this.

I cannot send SSL secure email through the site.

but I can throw it with other settings.

sample

	//Server settings
		$mail->isSMTP();                                            // Send using SMTP
		$mail->Host = 'mail.ruyadaruya.com';                    // Set the SMTP server to send through
		$mail->SMTPAuth = true;                                   // Enable SMTP authentication
		$mail->Username = 'bilgi@ruyadaruya.com';                     // SMTP username
		$mail->Password = '**********';                               // SMTP password
		$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;         // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged
		$mail->Port = 587;                                    // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above

		$mail->SMTPOptions = [
			'ssl' => [
				'verify_peer'       => false,
				'verify_peer_name'  => false,
				'allow_self_signed' => true
			]
		];

how to fix?

...