Notifications
Clear all

Script [Solved] Error 2252

6 Posts
3 Users
3 Likes
528 Views
Posts: 38
Topic starter
(@urisil)
Trusted Member
Joined: 2 years ago

I've read the posts regarding error 2252 and the solution that worked for me was to add // in the function.php file as instructed here. The problem is that every time I update the plugin, the file is reset and the change that I make is no longer there. Is there a way to solve this problem for good? 

5 Replies
Posts: 38
Topic starter
(@urisil)
Trusted Member
Joined: 2 years ago

Bumping this, this is an issue that keeps repeating itself. Would love to find a solution for this.

Chris
Posts: 3650
(@chris)
Famed Member
Joined: 3 years ago

Hi @urisil,

We will insert a hook in the new update, that you could disable with the hook.

3 Replies
(@urisil)
Joined: 2 years ago

Trusted Member
Posts: 38

@chris I see that you have added the hook in the latest update, 2.1.4. Am I correct in assuming that I need to change the value to false in order not to get the 2252/2253 error?

if( apply_filters( 'wpforo_check_referer', false )

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10503

Hi @urisil,

It's wrong. You're doing the same hard code, and you'll have to do it in the future. The correct way is adding a hook code in either a PHP code snippets using Code Snippets plugin or directly in the functions.php file of your current active theme. Here is the code you should use:

add_filter('wpforo_check_referer', '__return_false');
(@urisil)
Joined: 2 years ago

Trusted Member
Posts: 38

@robert Excellent, I can confirm this works. Thanks!