Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4093

Object passed instead of string to json_decode()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Won't Fix
    • Affects Version/s: 5.0.0-b1
    • Fix Version/s: 5.0.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      The tests are failing during build, due to an object being passed instead of a string to the json_decode() function.

           [exec] 1) ServiceChangesTest::testGet with data set #0 (stdClass Object (...))
           [exec] UnknownException: json_decode() expects parameter 1 to be string, object given
           [exec] 
           [exec] /Volumes/Archive/Documents/Projects/BitBucket/blesta/core/public_html/vendors/monolog/monolog/src/Monolog/ErrorHandler.php:201
           [exec] /Volumes/Archive/Documents/Projects/BitBucket/blesta/core/public_html/app/models/service_changes.php:121
           [exec] /Volumes/Archive/Documents/Projects/BitBucket/blesta/core/tests/unit/app/models/ServiceChangesTest.php:152
           [exec] 
           [exec] 2) ServiceChangesTest::testGetAll
           [exec] UnknownException: json_decode() expects parameter 1 to be string, object given
           [exec] 
           [exec] /Volumes/Archive/Documents/Projects/BitBucket/blesta/core/public_html/app/models/service_changes.php:150
           [exec] /Volumes/Archive/Documents/Projects/BitBucket/blesta/core/tests/unit/app/models/ServiceChangesTest.php:194
           [exec] 
           [exec] 3) ServiceChangesTest::testProcess with data set #0 (1, false)
           [exec] UnknownException: json_decode() expects parameter 1 to be string, object given
           [exec] 
           [exec] /Volumes/Archive/Documents/Projects/BitBucket/blesta/core/public_html/app/models/service_changes.php:121
           [exec] /Volumes/Archive/Documents/Projects/BitBucket/blesta/core/public_html/app/models/service_changes.php:167
           [exec] /Volumes/Archive/Documents/Projects/BitBucket/blesta/core/tests/unit/app/models/ServiceChangesTest.php:236
           [exec] 
           [exec] 4) ServiceChangesTest::testProcess with data set #1 (1, true)
           [exec] UnknownException: json_decode() expects parameter 1 to be string, object given
           [exec] 
           [exec] /Volumes/Archive/Documents/Projects/BitBucket/blesta/core/public_html/app/models/service_changes.php:121
           [exec] /Volumes/Archive/Documents/Projects/BitBucket/blesta/core/public_html/app/models/service_changes.php:167
           [exec] /Volumes/Archive/Documents/Projects/BitBucket/blesta/core/tests/unit/app/models/ServiceChangesTest.php:236
      

        Activity

        abdy Abdy Franco created issue -
        abdy Abdy Franco made changes -
        Field Original Value New Value
        Rank Ranked higher
        abdy Abdy Franco made changes -
        Status Open [ 1 ] In Review [ 5 ]
        Resolution Won't Fix [ 2 ]
        abdy Abdy Franco made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            abdy Abdy Franco
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              23/Dec/20