I may or may not be fixing these in the best manor possible. For the STRIP error I added this code to plugin.php:
if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
{
/**
* @ignore
*/
define('STRIP', false);
}
else
{
@set_magic_quotes_runtime(0);
// Be paranoid with passed vars
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get'))
{
deregister_globals();
}
define('STRIP', (get_magic_quotes_gpc()) ? true : false);
}
after
require($phpbb_config);
For the registration.php is depreciated I commented out this line (out of plugin.php)
// require_once(ABSPATH . WPINC . '/registration.php');
(there is nothing in the file it is only a stub returning the error)
For the Undefined property: user::$ID it comes from this code in plugin.php:
else if($userid > 0 && $userid != $user->ID)
Any idea what this should be??
For the final redirect_to error, it comes from this code in plugin.php:
$redirect = trim($redirect_to);
There is no indication or previous setting of this variable, $redirect_to, that I can fine. Not sure what it is supposed to be.
Appreciate any help in resolving these last couple of error messages.
After looking at the session.php file within phpBB (version 3.0.8) I decided to change the line producing the error in plugin.php as follows
code before:
else if($userid > 0 && $userid != $user->ID)
changed to:
else if($userid > 0 && $userid != $user->data['user_id'])
this is just a guess as the next option was to just check property_exists to eliminate the error. I looked at previous versions of the phpBB session.php and the user class and did not see ID as a variable in any of them (so it seems like the error has been around for a while).
just added a check to see if $redirect_to is set as I couldn’t see where this might be set or what it might mean. This is in plugin.php
$redirect = trim($redirect_to);
changed to
if (isset($redirect_to)) {
$redirect = trim($redirect_to);
}
Anonymous User 8295407
(@anonymized-8295407)
hah. Awesome work dude. I was about to start digging into these. I’ll give it a shot tomorrow and report back any issues.
Anonymous User 8295407
(@anonymized-8295407)
Well so far so good. No more errors and it still seems to be working (other than an unrelated issue I’m having with it). Good job and thanks!
There are two more undefined index errors generated when the form widget is first added. To have them not generate an error and default a value make the following two changes:
change this
<input id="<?php echo $this->get_field_id('login_title'); ?>" name="<?php echo $this->get_field_name('login_title'); ?>" type="text" value="<?php echo $instance['login_title']; ?>" />
to this
<input id="<?php echo $this->get_field_id('info_title'); ?>" name="<?php echo $this->get_field_name('info_title'); ?>" type="text" value="<?php echo isset($instance['info_title']) ? $instance['info_title'] : '{USERNAME}'; ?>" />
and change this
<input id="<?php echo $this->get_field_id('info_title'); ?>" name="<?php echo $this->get_field_name('info_title'); ?>" type="text" value="<?php echo $instance['info_title']; ?>" />
to this
<input id="<?php echo $this->get_field_id('info_title'); ?>" name="<?php echo $this->get_field_name('info_title'); ?>" type="text" value="<?php echo isset($instance['info_title']) ? $instance['info_title'] : '{USERNAME}'; ?>" />