Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2684 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  squirrelmail et php 5.0.5

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

squirrelmail et php 5.0.5

n°1199493
bagu
Posté le 14-09-2005 à 16:52:57  profilanswer
 

Bonjour,
 
J'utilise php 5.0.5 et squirrelmail 1.4.5 et depuis que je suis passé de php 5.0.4 à php 5.0.5 j'obtiens ce message d'erreur :
 
Fatal error: Only variables can be passed by reference in \functions\imap_messages.php on line 480
 
La fonction en question est la suivante :

Code :
  1. function parsePriority($value) {
  2.     $value = strtolower(array_shift(split('/\w/',trim($value))));
  3.     if ( is_numeric($value) ) {
  4.         return $value;
  5.     }
  6.     if ( $value == 'urgent' || $value == 'high' ) {
  7.         return 1;
  8.     } elseif ( $value == 'non-urgent' || $value == 'low' ) {
  9.         return 5;
  10.     }
  11.     return 3;
  12. }


 
comment corriger l'erreur ? Merci

mood
Publicité
Posté le 14-09-2005 à 16:52:57  profilanswer
 

n°1199504
bagu
Posté le 14-09-2005 à 17:00:01  profilanswer
 

Bon, ben j'ai trouvé la réponse à ma question (enfin presque) :
 

Code :
  1. *  Error: Fatal error: Only variables can be passed by reference in /usr/local/apache2/htdocs/squirrelmail/functions/imap_messages.php on line 480
  2. After upgrading from PHP4 to PHP5.1, my Squirrelmail now sends this message when I check mail, when I click on INBOX, or when I click on "sent." Everything else continues to work.
  3. This seems to be triggered by PHP 5.1, since this error never came up when using squirrelmail with PHP 5.0.x.
  4. Correction: The problem also occurs with PHP 5.0.5 (not with 5.0.4) !!
  5. You might also want to check out http://sourceforge.net/tracker/ind [...] tid=423679 - This patch should fix the problem (stolen from squirrelmail-stable.diff)
  6. diff -urN squirrelmail-stable.orig/functions/imap_messages.php squirrelmail-stable/functions/imap_messages.php
  7. --- squirrelmail-stable.orig/functions/imap_messages.php 2005-04-17 18:50:14.000000000 +0300
  8. +++ squirrelmail-stable/functions/imap_messages.php 2005-07-14 09:23:02.991592896 +0300
  9. @@ -476,8 +476,9 @@
  10. * NOTE: this is actually a duplicate from the function in
  11. * class/mime/Rfc822Header.php.
  12. */
  13. -function parsePriority($value) {
  14. - $value = strtolower(array_shift(split('/\w/',trim($value))));
  15. +function parsePriority($sValue) {
  16. + $aValue=split('/\w/',trim($sValue));
  17. + $value = strtolower(array_shift($aValue));
  18. if ( is_numeric($value) ) {
  19. return $value;
  20. }
  21. Michael Abshoff (too lazy to create an account)
  22. Its imap_messages.php just in case someone is working late at night and tries to find the file with find


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  squirrelmail et php 5.0.5

 

Sujets relatifs
Plus de sujets relatifs à : squirrelmail et php 5.0.5


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)