← Back to team overview

mahara-contributors team mailing list archive

[Bug 1945537] A change has been merged

 

Reviewed:  https://reviews.mahara.org/c/mahara/+/12478
Committed: https://git.mahara.org/mahara/mahara/commit/6b3b10bdb28af000cf7f84fffee1c626e7562918
Submitter: "Robert Lyon <robertl@xxxxxxxxxxxxxxx>"
Branch:    main

commit 6b3b10bdb28af000cf7f84fffee1c626e7562918
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date:   Mon Mar 7 14:14:12 2022 +1300

Bug 1945537: format the time taken number

So it can be saved in the database correctly

Change-Id: Ida0bb13df0203bfa825bbac0a4123f0bfca9c9c3
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1945537

Title:
  Problem with saving web service log message event when float is in
  another  language

Status in Mahara:
  Fix Committed

Bug description:
  Initially reported at
  https://mahara.org/interaction/forum/topic.php?id=8930

  So  for example we try to save number as 1,2345 instead of 1.2345

  We probably need to cast it via flotval somehow

  Error looks like this
  PHP Fatal error:  Uncaught SQLException: Failed to get a recordset: postgres8 error: [-1: ERROR:  invalid input syntax for type numeric: "0,12291693687439"] in EXECUTE("INSERT INTO "external_services_logs" ("id", "timelogged", "userid", "externalserviceid", "protocol", "auth", "functionname", "timetaken", "uri", "info", "ip") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")Command was: INSERT INTO "external_services_logs" ("id", "timelogged", "userid", "externalserviceid", "protocol", "auth", "functionname", "timetaken", "uri", "info", "ip") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and values was (id:109,timelogged:1632941361,userid:23,externalserviceid:3,protocol:REST,auth:OTHER,functionname:module_mobileapi_upload_blog_post,timetaken:0,12291693687439,uri:/webservice/rest/server.php?alt=json,info:exception:SQLExceptionmessage:Failedtogetarecordset:postgres8error:[-1:ERROR:invalidinputsyntaxfortypenumeric:"0,11438679695129"]inEXECUTE("INSERTINTO"external_services_logs"("id","timelogged","userid","externalserviceid","protocol","auth"

  The problem looks to be related to:

  The variable "time_taken" in file:

  htdocs/webservice/lib.php

   $time_taken = $time_end - $WEBSERVICE_START;

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1945537/+subscriptions



References