Bug#323269: horde2: errors on login attempts: Only variable references should be returned by reference in...

2005-10-03 Thread Arnaud Legrand

Hi,

A few days ago, Ola Lundqvist wrote:


Thanks a lot for the information. If you have a patch available I would
be really happy. :)


It'd have been faster to perform the changes directly by yourself as it was
only minor modifications... Anyway here's the script to build the patch
along with the patch. I tried it on my computer and it worked perfectly
fine.

  surf:~ $ ./horde2_build_patch.sh
  surf:~ $ cd /
  surf:/ $ sudo patch -p0  /tmp/debian/crappy_files.patch
  Password:
  patching file usr/share/horde2/lib/Token.php
  patching file usr/share/horde2/lib/Category.php
  patching file usr/share/horde2/lib/VFS.php
  patching file usr/share/horde2/lib/Cache.php
  patching file usr/share/horde2/lib/SessionHandler.php
  patching file usr/share/horde2/kronolith/lib/Driver.php

Regards,

  Arnaud Legrand

--
Beware of bugs in the above code; I have only proved it correct, not tried
it.
   -- D.E.Knuth

horde2_build_patch.sh
Description: Bourne shell script
--- usr/share/horde2/lib/Token.php.bak  2005-10-03 11:41:12.0 +0200
+++ usr/share/horde2/lib/Token.php  2005-10-03 11:41:12.0 +0200
@@ -78,7 +78,7 @@ class Token {
 }
 $class = 'Token_' . $driver;
 if (class_exists($class)) {
-return new $class($params);
+$res = new $class($params); return $res;
 } else {
 return PEAR::raiseError('Class definition of ' . $class . ' not 
found.');
 }
--- usr/share/horde2/lib/Category.php.bak   2005-10-03 11:41:12.0 
+0200
+++ usr/share/horde2/lib/Category.php   2005-10-03 11:41:12.0 +0200
@@ -130,7 +130,7 @@ class Category {
 }
 $class = 'Category_' . $driver;
 if (class_exists($class)) {
-return new $class($params);
+$res = new $class($params); return $res;
 } else {
 return PEAR::raiseError('Class definition of ' . $class . ' not 
found.');
 }
--- usr/share/horde2/lib/VFS.php.bak2005-10-03 11:41:12.0 +0200
+++ usr/share/horde2/lib/VFS.php2005-10-03 11:41:12.0 +0200
@@ -77,7 +77,7 @@ class Horde_VFS {
 }
 $class = 'Horde_VFS_' . $driver;
 if (class_exists($class)) {
-return new $class($params);
+$res = new $class($params); return $res;
 } else {
 return PEAR::raiseError('Class definition of ' . $class . ' not 
found.');
 }
--- usr/share/horde2/lib/Cache.php.bak  2005-10-03 11:41:12.0 +0200
+++ usr/share/horde2/lib/Cache.php  2005-10-03 11:41:12.0 +0200
@@ -59,7 +59,7 @@ class Cache {
 }
 $class = 'Cache_' . $driver;
 if (class_exists($class)) {
-return new $class($params);
+$res = new $class($params); return $res;
 } else {
 return PEAR::raiseError('Class definition of ' . $class . ' not 
found.');
 }
--- usr/share/horde2/lib/SessionHandler.php.bak 2005-10-03 11:41:12.0 
+0200
+++ usr/share/horde2/lib/SessionHandler.php 2005-10-03 11:41:12.0 
+0200
@@ -56,7 +56,7 @@ class SessionHandler {
 
 $class = 'SessionHandler_' . $driver;
 if (class_exists($class)) {
-return new $class($params);
+$res = new $class($params); return $res;
 } else {
 return PEAR::raiseError('Class definition of ' . $class . ' not 
found.');
 }
--- usr/share/horde2/kronolith/lib/Driver.php.bak   2005-10-03 
11:41:12.0 +0200
+++ usr/share/horde2/kronolith/lib/Driver.php   2005-10-03 11:41:12.0 
+0200
@@ -68,7 +68,7 @@ class Kronolith_Driver {
 include_once dirname(__FILE__) . '/Driver/' . $driver . '.php';
 $class = 'Kronolith_Driver_' . $driver;
 if (class_exists($class)) {
-return new $class($params);
+$res = new $class($params); return $res;
 } else {
 Horde::fatal(new PEAR_Error(sprintf(_(Unable to load the 
definition of %s.), $class)), __FILE__, __LINE__);
 }


Bug#323269: horde2: errors on login attempts: Only variable references should be returned by reference in...

2005-10-03 Thread Ola Lundqvist
tags #323269 + path
thanks

Thanks a lot for the patch.

Regards,

// Ola

On Mon, Oct 03, 2005 at 12:35:11PM +0200, Arnaud Legrand wrote:
 Hi,
 
 A few days ago, Ola Lundqvist wrote:
 
 Thanks a lot for the information. If you have a patch available I would
 be really happy. :)
 
 It'd have been faster to perform the changes directly by yourself as it was
 only minor modifications... Anyway here's the script to build the patch
 along with the patch. I tried it on my computer and it worked perfectly
 fine.
 
   surf:~ $ ./horde2_build_patch.sh
   surf:~ $ cd /
   surf:/ $ sudo patch -p0  /tmp/debian/crappy_files.patch
   Password:
   patching file usr/share/horde2/lib/Token.php
   patching file usr/share/horde2/lib/Category.php
   patching file usr/share/horde2/lib/VFS.php
   patching file usr/share/horde2/lib/Cache.php
   patching file usr/share/horde2/lib/SessionHandler.php
   patching file usr/share/horde2/kronolith/lib/Driver.php
 
 Regards,
 
   Arnaud Legrand
 
 --
 Beware of bugs in the above code; I have only proved it correct, not tried
 it.
-- 
D.E.Knuth


 --- usr/share/horde2/lib/Token.php.bak2005-10-03 11:41:12.0 
 +0200
 +++ usr/share/horde2/lib/Token.php2005-10-03 11:41:12.0 +0200
 @@ -78,7 +78,7 @@ class Token {
  }
  $class = 'Token_' . $driver;
  if (class_exists($class)) {
 -return new $class($params);
 +$res = new $class($params); return $res;
  } else {
  return PEAR::raiseError('Class definition of ' . $class . ' not 
 found.');
  }
 --- usr/share/horde2/lib/Category.php.bak 2005-10-03 11:41:12.0 
 +0200
 +++ usr/share/horde2/lib/Category.php 2005-10-03 11:41:12.0 +0200
 @@ -130,7 +130,7 @@ class Category {
  }
  $class = 'Category_' . $driver;
  if (class_exists($class)) {
 -return new $class($params);
 +$res = new $class($params); return $res;
  } else {
  return PEAR::raiseError('Class definition of ' . $class . ' not 
 found.');
  }
 --- usr/share/horde2/lib/VFS.php.bak  2005-10-03 11:41:12.0 +0200
 +++ usr/share/horde2/lib/VFS.php  2005-10-03 11:41:12.0 +0200
 @@ -77,7 +77,7 @@ class Horde_VFS {
  }
  $class = 'Horde_VFS_' . $driver;
  if (class_exists($class)) {
 -return new $class($params);
 +$res = new $class($params); return $res;
  } else {
  return PEAR::raiseError('Class definition of ' . $class . ' not 
 found.');
  }
 --- usr/share/horde2/lib/Cache.php.bak2005-10-03 11:41:12.0 
 +0200
 +++ usr/share/horde2/lib/Cache.php2005-10-03 11:41:12.0 +0200
 @@ -59,7 +59,7 @@ class Cache {
  }
  $class = 'Cache_' . $driver;
  if (class_exists($class)) {
 -return new $class($params);
 +$res = new $class($params); return $res;
  } else {
  return PEAR::raiseError('Class definition of ' . $class . ' not 
 found.');
  }
 --- usr/share/horde2/lib/SessionHandler.php.bak   2005-10-03 
 11:41:12.0 +0200
 +++ usr/share/horde2/lib/SessionHandler.php   2005-10-03 11:41:12.0 
 +0200
 @@ -56,7 +56,7 @@ class SessionHandler {
  
  $class = 'SessionHandler_' . $driver;
  if (class_exists($class)) {
 -return new $class($params);
 +$res = new $class($params); return $res;
  } else {
  return PEAR::raiseError('Class definition of ' . $class . ' not 
 found.');
  }
 --- usr/share/horde2/kronolith/lib/Driver.php.bak 2005-10-03 
 11:41:12.0 +0200
 +++ usr/share/horde2/kronolith/lib/Driver.php 2005-10-03 11:41:12.0 
 +0200
 @@ -68,7 +68,7 @@ class Kronolith_Driver {
  include_once dirname(__FILE__) . '/Driver/' . $driver . '.php';
  $class = 'Kronolith_Driver_' . $driver;
  if (class_exists($class)) {
 -return new $class($params);
 +$res = new $class($params); return $res;
  } else {
  Horde::fatal(new PEAR_Error(sprintf(_(Unable to load the 
 definition of %s.), $class)), __FILE__, __LINE__);
  }


-- 
 --- Ola Lundqvist systemkonsult --- M Sc in IT Engineering 
/  [EMAIL PROTECTED]   Annebergsslingan 37\
|  [EMAIL PROTECTED]   654 65 KARLSTAD|
|  http://www.opal.dhs.org   Mobile: +46 (0)70-332 1551 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9  /
 ---


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#323269: horde2: errors on login attempts: Only variable references should be returned by reference in...

2005-09-29 Thread Arnaud Legrand

Hi

  I'm running debian unstable and have the 2.2.8-3 version of horde2. I
still have some messages like Only variable references should be returned
by reference. I solved the issue by doing the same modifications as Lionel
Elie Mamane did in his patch but on the following places:

/usr/share/horde2/kronolith/lib/Driver.php line 71
/usr/share/horde2/mnemo/lib/Driver.php line 64

I think you should consider doing the same in your next release. For your
information, the deprecated construct return new $class($params); also
appear in the following files:

/usr/share/horde2/lib/Token.php
/usr/share/horde2/lib/Category.php
/usr/share/horde2/lib/VFS.php
/usr/share/horde2/lib/Cache.php
/usr/share/horde2/lib/SessionHandler.php

Cheers,

Arnaud


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#323269: horde2: errors on login attempts: Only variable references should be returned by reference in...

2005-09-29 Thread Ola Lundqvist
Hello

On Thu, Sep 29, 2005 at 08:31:57AM +0200, Arnaud Legrand wrote:
 Hi
 
   I'm running debian unstable and have the 2.2.8-3 version of horde2. I
 still have some messages like Only variable references should be returned
 by reference. I solved the issue by doing the same modifications as Lionel
 Elie Mamane did in his patch but on the following places:
 
 /usr/share/horde2/kronolith/lib/Driver.php line 71
 /usr/share/horde2/mnemo/lib/Driver.php line 64
 
 I think you should consider doing the same in your next release. For your
 information, the deprecated construct return new $class($params); also
 appear in the following files:
 
 /usr/share/horde2/lib/Token.php
 /usr/share/horde2/lib/Category.php
 /usr/share/horde2/lib/VFS.php
 /usr/share/horde2/lib/Cache.php
 /usr/share/horde2/lib/SessionHandler.php

Thanks a lot for the information. If you have a patch available I would
be really happy. :)

Regards,

// Ola

 Cheers,
 
 Arnaud
 
 

-- 
 - Ola Lundqvist ---
/  [EMAIL PROTECTED] Annebergsslingan 37  \
|  [EMAIL PROTECTED] 654 65 KARLSTAD  |
|  +46 (0)54-10 14 30  +46 (0)70-332 1551   |
|  http://www.opal.dhs.org UIN/icq: 4912500 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]