forked from extern/egroupware
Cleanups for a couple of warnings.
This commit is contained in:
parent
24f4f79cdc
commit
c84ba29fd4
@ -34,9 +34,13 @@
|
|||||||
var $td = False; /* Handle for mcrypt */
|
var $td = False; /* Handle for mcrypt */
|
||||||
var $iv = '';
|
var $iv = '';
|
||||||
var $key = '';
|
var $key = '';
|
||||||
|
var $debug = True;
|
||||||
|
var $debug = False;
|
||||||
|
|
||||||
function crypto($vars)
|
function crypto($vars)
|
||||||
{
|
{
|
||||||
|
/* _debug_array(mcrypt_list_algorithms()); */
|
||||||
|
|
||||||
$key = $vars[0];
|
$key = $vars[0];
|
||||||
$iv = $vars[1];
|
$iv = $vars[1];
|
||||||
if ($GLOBALS['phpgw_info']['server']['mcrypt_enabled'] && extension_loaded('mcrypt'))
|
if ($GLOBALS['phpgw_info']['server']['mcrypt_enabled'] && extension_loaded('mcrypt'))
|
||||||
@ -214,14 +218,14 @@
|
|||||||
{
|
{
|
||||||
echo '<br>' . time() . ' crypto->decrypt() decrypted data: ---->>>>' . $data;
|
echo '<br>' . time() . ' crypto->decrypt() decrypted data: ---->>>>' . $data;
|
||||||
}
|
}
|
||||||
$test = unserialize(stripslashes($data));
|
$test = stripslashes($data);
|
||||||
if($test)
|
if(@unserialize($test))
|
||||||
{
|
{
|
||||||
if($this->debug)
|
if($this->debug)
|
||||||
{
|
{
|
||||||
echo '<br>' . time() . ' crypto->decrypt() stripping slashes' . "\n";
|
echo '<br>' . time() . ' crypto->decrypt() stripping slashes' . "\n";
|
||||||
}
|
}
|
||||||
$data = stripslashes($data);
|
$data = $test;
|
||||||
}
|
}
|
||||||
unset($test);
|
unset($test);
|
||||||
|
|
||||||
@ -236,7 +240,7 @@
|
|||||||
$data = $encrypteddata;
|
$data = $encrypteddata;
|
||||||
}
|
}
|
||||||
|
|
||||||
$newdata = unserialize($data);
|
$newdata = @unserialize($data);
|
||||||
if($newdata)
|
if($newdata)
|
||||||
{
|
{
|
||||||
if($this->debug)
|
if($this->debug)
|
||||||
|
Loading…
Reference in New Issue
Block a user