Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#1487676 closed Bugs (fixed)

message variable is empty on result array return

Reported by: jjimenez Owned by:
Priority: 5 Milestone: 0.6-beta
Component: Plugins Version: 0.5-rc
Severity: normal Keywords: password error array message
Cc:

Description

When password_save returns an array the message value is not accesible because $result variable has been reasigned to the code value, and then $result becomes a number (the $result array have been replaced by the $result number).

To solve this issue changing the order of the two assignements in password.php is enought:

@@ -232,8 +232,8 @@
         $result = password_save($curpass, $passwd);
 
         if (is_array($result)) {
-            $message = $result['message'];
             $result  = $result['code'];
+            $message = $result['message'];
         }
 
         switch ($result) {

Change History (4)

comment:1 Changed 2 years ago by alec

  • Milestone changed from later to 0.6-beta
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r4413/svn.

comment:2 follow-up: Changed 2 years ago by alec

  • Milestone changed from 0.6-beta to 0.5.1

comment:3 in reply to: ↑ 2 Changed 2 years ago by jjimenez

Replying to alec:
Sorry, I am testing 0.5.1 release, but it seems this fix has not been included.

comment:4 Changed 2 years ago by alec

  • Milestone changed from 0.5.1 to 0.6-beta

Yes. By a mistake it was not included into 0.5.1, but for 0.5.2 it will be included.

Note: See TracTickets for help on using tickets.