Tried to activate. Triggered fatal error: "Call to undefined function get_called_class() in ..../wordpress/wp-content/plugins/wp-users-exporter/A_UserExporter.class.php on line 70
Tried to activate. Triggered fatal error: "Call to undefined function get_called_class() in ..../wordpress/wp-content/plugins/wp-users-exporter/A_UserExporter.class.php on line 70
Hi xrobek,
This plugin requires PHP version 5.3 or greater. We are going to put this information in the docs.
Leo,,
Thanks. I'm using PHP Version 5.2.10.
Unfortunately I had the same issue and voted it as broken for version 3.3
My version is 5.2.17, will test it later with the required version.
As a suggestion, why not test for the PHP version before activating it?
I can help with that if needed.
Hi, I've made some changes and it works now in PHP 5.2
File: A_UserExporter.class.php
Comments in Lines 2 and 96
It worked for me
Greetings
with php 5.2.x, you can use this trick :
<?php if (!function_exists('get_called_class')):
function get_called_class()
{
$bt = debug_backtrace();
$lines = file($bt[1]['file']);
preg_match('/([a-zA-Z0-9\_]+)::'.$bt[1]['function'].'/',
$lines[$bt[1]['line']-1],
$matches);
if(empty($matches[1])){
$pp= serialize( $bt[1]["object"]);
$nx=strpos($pp,'"')+1;
$nx=substr($pp,$nx,strpos($pp,'"'));
if (!empty($nx))
{
echo " RETURING....: (". $nx . ")";
return $nx;
}
}
echo " RETURING....: (" . $matches[1] . ")";
return $matches[1];
}
endif;
?>You must log in to post.