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

        Hide
        jonathan Jonathan Reissmueller added a comment -

        Couldn't reproduce this one on a fresh install from the dev branch.

        Show
        jonathan Jonathan Reissmueller added a comment - Couldn't reproduce this one on a fresh install from the dev branch.
        Hide
        abdy Abdy Franco added a comment -

        You are right, the error appeared because I had error reporting enabled.

        Show
        abdy Abdy Franco added a comment - You are right, the error appeared because I had error reporting enabled.

          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