Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-8957

eZPersistenObject::fetch takes definition by reference

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 4.0.0alpha1
    • 3.8.3
    • Misc
    • None
    • Version: 3.8.3
      PHP Version:
      Webserver:
      Database:

    Description

      but the first argument passed to the function is not always a variable, like in eZUser::fetch

          function fetch( $id, $asObject = true )
          {
              return eZPersistentObject::fetchObject( eZUser::definition(),
                                                      null,
                                                      array( 'contentobject_id' => $id ),
                                                      $asObject );
          }
      

      Normally PHP would warn you about this:

      Only variables should be assigned by reference in /srv/ezpublish/ez38/kernel/classes/datatypes/ezuser/ezuserloginhandler.php on line 67
      

      But these warnings are silently discarded by the eZDebugErrorHandler function (which I think is not good practice at all):

      if ( preg_match( "/variable(.*?)reference/", $errstr ) )
          return;
      

      (also see this forum topic: http://ez.no/community/forum/developer/debug_filters_out_variable_reference_errors ).

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            cyberwolf cyberwolf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: