Bukimedia / PrestaSharp

CSharp .Net client library for the PrestaShop API via web service
GNU General Public License v3.0
155 stars 153 forks source link

Error Update Product #349

Closed capricornius closed 5 years ago

capricornius commented 5 years ago

Source Value : Bukimedia.PrestaSharp.Entities.product Find Value: \ Replace Value: \ \

internal static string ReplaceFirstOccurrence(string Source, string Find, string Replace) { int Place = Source.IndexOf(Find); string result = Source.Remove(Place, Find.Length).Insert(Place, Replace); return result; }

of course the value of Place == -1 so error is generated because that value (Source) does not contain "\" ((System.ArgumentOutOfRangeException)ex).Message:

StartIndex cannot be less than zero. Parameter name: startIndex

mowcixo commented 5 years ago

Hello @capricornius, which version of the library you have? It should be fixed in v1.0.3

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.