Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with PHP 7.*? #63

Open
ghost opened this issue Apr 6, 2018 · 11 comments
Open

Not compatible with PHP 7.*? #63

ghost opened this issue Apr 6, 2018 · 11 comments

Comments

@ghost
Copy link

ghost commented Apr 6, 2018

Hey, i attemped to install Google SEO but i kept getting warnings

File Line Function
C:\xampp\htdocs\LeakZone\inc\plugins\google_seo\plugin.php 550 errorHandler->error
C:\xampp\htdocs\LeakZone\inc\plugins\google_seo\plugin.php 68 google_seo_plugin_status
C:\xampp\htdocs\LeakZone\inc\plugins\google_seo.php 50 google_seo_plugin_info
C:\xampp\htdocs\LeakZone\admin\modules\config\plugins.php 527 google_seo_info
C:\xampp\htdocs\LeakZone\admin\index.php 821 require

I figured that this might be because i use PHP 7.2.1 but i cannot seem to find a XAMPP version with PHP 5.1.0?
,

@frostschutz
Copy link
Owner

Are you using the version from GitHub? It already has two fixes regarding PHP 7.2.x compatibility. There is also a fix in github frostschutz/MyBB-PluginLibrary.

I have to do a full code review regarding 7.2.x compatibility, it seems I've been checking arrays in particular in a way PHP does not like (anymore).

@ghost
Copy link
Author

ghost commented Apr 6, 2018

Which release of PluginLibrary do i get for MyBB 1.8.15? I tried 12 and 11 and MyBB says theyre not compatible, just downloaded the newest version of Google SEO from your github.

@frostschutz
Copy link
Owner

@ErikThiart
Copy link

ErikThiart commented Jun 22, 2018

Hey @frostschutz

I have the same issue.

These are the error messages:

File: inc/plugins/google_seo/404.php (Line no. 37)
Message
Use of undefined constant THIS_SCRIPT - assumed 'THIS_SCRIPT' (this will throw an Error in a future version of PHP) 
File: inc/plugins/google_seo/url.php (Line no. 159)
Message
Use of undefined constant THIS_SCRIPT - assumed 'THIS_SCRIPT' (this will throw an Error in a future version of PHP)
File: inc/plugins/google_seo/url.php (Line no. 1101)
Message
Use of undefined constant THIS_SCRIPT - assumed 'THIS_SCRIPT' (this will throw an Error in a future version of PHP) 

Info on the plugin

    $info = array(
        "name"          => "Google SEO",
        "website"       => "https://github.com/frostschutz/MyBB-Google-SEO",
        "description"   => "{$lang->googleseo_plugin_description}",
        "author"        => "Andreas Klauer",
        "authorsite"    => "mailto:[email protected]",
        "version"       => "1.8.2",
        "guid"          => "8d12371391e1c95392dd567617e40f7f",
        "compatibility" => "*",
        "codename"      => "google_seo",
    );

@Eldenroot
Copy link

Do you have any ETA? This plugin is a must have one, but my webhosting pushes and will update to php 7.2 in 12 days :(

@PennyLook
Copy link

PennyLook commented Aug 4, 2018

@fvlthy @Eldenroot
Here's fix:
you should change 550 line (in google_seo\plugin.php) to:

if($edits && count($edits) ==1)

After that I do not have any warnings.

@frostschutz
Copy link
Owner

@PennyLook good catch, but it can also be > 1. I added the missing variable initialization.

@marble34534
Copy link

Hello,

If I use PHP 7.2, I will get the following error:

Type: 2
File: inc/plugins/google_seo/sitemap.php (Line no. 462)
Message
sizeof(): Parameter must be an array or an object that implements Countable

I use Google SEO (1.8.2) and MyBB 1.8.18

@frostschutz
Copy link
Owner

Thanks, I'll try to make a new release over the weekend. Remind me if I don't.

@frostschutz
Copy link
Owner

Released the update (along with an update for PluginLibrary).

Please let me know if there any more problems. Thank you.

@marble34534
Copy link

Thank you very much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants