Title: System.InvalidCastException: 'Unable to cast object of type 'System.Int32' to type 'System.String'.' · Issue #43 · StringEpsilon/PhpSerializerNET · GitHub
Open Graph Title: System.InvalidCastException: 'Unable to cast object of type 'System.Int32' to type 'System.String'.' · Issue #43 · StringEpsilon/PhpSerializerNET
X Title: System.InvalidCastException: 'Unable to cast object of type 'System.Int32' to type 'System.String'.' · Issue #43 · StringEpsilon/PhpSerializerNET
Description: Using latest - I was on 1.4.0 still, but i now need to upgrade to 2.1.0. System.InvalidCastException HResult=0x80004002 Message=Unable to cast object of type 'System.Int32' to type 'System.String'. Source=System.Private.CoreLib StackTrac...
Open Graph Description: Using latest - I was on 1.4.0 still, but i now need to upgrade to 2.1.0. System.InvalidCastException HResult=0x80004002 Message=Unable to cast object of type 'System.Int32' to type 'System.String'....
X Description: Using latest - I was on 1.4.0 still, but i now need to upgrade to 2.1.0. System.InvalidCastException HResult=0x80004002 Message=Unable to cast object of type 'System.Int32' to type 'Sys...
Opengraph URL: https://github.com/StringEpsilon/PhpSerializerNET/issues/43
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"System.InvalidCastException: 'Unable to cast object of type 'System.Int32' to type 'System.String'.'","articleBody":"Using latest - I was on 1.4.0 still, but i now need to upgrade to 2.1.0. \n\n```\nSystem.InvalidCastException\n HResult=0x80004002\n Message=Unable to cast object of type 'System.Int32' to type 'System.String'.\n Source=System.Private.CoreLib\n StackTrace:\n at System.Runtime.CompilerServices.CastHelpers.ChkCast_Helper(Void* toTypeHnd, Object obj)\n at PhpSerializerNET.PhpDeserializer.MakeClass(PhpToken\u0026 token)\n at PhpSerializerNET.PhpDeserializer.DeserializeToken(PhpToken\u0026 token)\n at PhpSerializerNET.PhpSerialization.Deserialize(String input, PhpDeserializationOptions options)\n at [REDACTED]\n```\n\n```\nO:40:\"KPS\\Shipping\\TrackingProviders\\B2CEurope\":1:{i:0;s:9:\"B2CEurope\";}\n```\n```\n__PHP_Incomplete_Class Object\n(\n [__PHP_Incomplete_Class_Name] =\u003e KPS\\Shipping\\TrackingProviders\\B2CEurope\n [0] =\u003e B2CEurope\n)\n```\n``` csharp\n// We don't use a model because there is more than one version, and we only want 1 property any ways.\nvar trackingProvider = (PhpObjectDictionary?)PhpSerialization.Deserialize(trackingProviderMetaValue, new() { EnableTypeLookup = false });\n\nif (trackingProvider != null \u0026\u0026 trackingProvider.TryGetValue(\"provider_name\", out var pNameObject))\n{\n var pName = (string?)pNameObject;\n if (!string.IsNullOrWhiteSpace(pName)\n \u0026\u0026 !pName.Equals(\"none\", StringComparison.InvariantCultureIgnoreCase)\n \u0026\u0026 !pName.Equals(\"unknown\", StringComparison.InvariantCultureIgnoreCase))\n {\n providerNames.Add(pName);\n }\n}\n```\n","author":{"url":"https://github.com/sommmen","@type":"Person","name":"sommmen"},"datePublished":"2025-03-10T08:37:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/43/PhpSerializerNET/issues/43"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:be3170dd-50b3-bb51-2d09-7cd4b7ae2e27 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E000:36E597:4D69487:6D54EDC:6A4FD54E |
| html-safe-nonce | b145d9990988e8f51ce2c0038af70b88fab53252260bdc5777a4085776390e3c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDAwOjM2RTU5Nzo0RDY5NDg3OjZENTRFREM6NkE0RkQ1NEUiLCJ2aXNpdG9yX2lkIjoiMzUyMzA3MDMyNTAzMjk5ODIyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a22813b2ae6d97bdc047ae3ed9aa17162fbdded509b2494364807607952c19de |
| hovercard-subject-tag | issue:2906477955 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/StringEpsilon/PhpSerializerNET/43/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9f90d04cfb2b7ef708b331644cd7f264260c23de45459d92a4ac8a04bee73289/StringEpsilon/PhpSerializerNET/issues/43 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9f90d04cfb2b7ef708b331644cd7f264260c23de45459d92a4ac8a04bee73289/StringEpsilon/PhpSerializerNET/issues/43 |
| og:image:alt | Using latest - I was on 1.4.0 still, but i now need to upgrade to 2.1.0. System.InvalidCastException HResult=0x80004002 Message=Unable to cast object of type 'System.Int32' to type 'System.String'.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sommmen |
| hostname | github.com |
| expected-hostname | github.com |
| None | 19b98c3d9767bb8a56238a89ff8401d1cbdf3bc5c353799aacf49fe6c76b4b7c |
| turbo-cache-control | no-preview |
| go-import | github.com/StringEpsilon/PhpSerializerNET git https://github.com/StringEpsilon/PhpSerializerNET.git |
| octolytics-dimension-user_id | 5951778 |
| octolytics-dimension-user_login | StringEpsilon |
| octolytics-dimension-repository_id | 403361593 |
| octolytics-dimension-repository_nwo | StringEpsilon/PhpSerializerNET |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 403361593 |
| octolytics-dimension-repository_network_root_nwo | StringEpsilon/PhpSerializerNET |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 142593e66413bbae27fd485859993597d5a3b104 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width