Ticket #1176 (closed defect: fixed)

Opened 12 months ago

Last modified 12 months ago

Documentation example in "7.1.5.1 Testing the existance of a relation" (listing .12) doesn't work

Reported by: Max_Schreck Owned by: jwage
Priority: minor Milestone:
Component: Documentation Version: 0.11.0
Severity: Keywords:
Cc: Has Test: no
Status: Pending Core Response Has Patch: no

Description

Example code in documentation section "7.1.5.1 Testing the existance of a relation" (listing .12) doesn't work.

$obj = new Model();
if(isset($obj->Relation())) { // returns false
        ...
}
$obj->Relation = new Relation();
if(isset($obj->Relation())) { // returns true
        ...
}

The "if" condition results in PHP fatal error "Can't use method return value in write context...".

Change History

Changed 12 months ago by jwage

  • status changed from new to closed
  • resolution set to fixed

(In [4569]) fixes #1176

Changed 12 months ago by anonymous

  • milestone 0.11.3 deleted

Milestone 0.11.3 deleted

Note: See TracTickets for help on using tickets.