Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Invalid
-
Affects Version/s: 1.0.0BETA1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:CentOS, PHP 5.3
Description
I am not sure if it's a bug of the framework or a bug in implementation of array_slice function in PHP
but when I try to pass @ReferenceMany field value into array_slice built-in PHP function it fails with error:
==============================================
array_slice() expects parameter 1 to be array, object given
==============================================
I know that PersistentCollection has method "slice" (at least in master branch) but my concern is backward compatibility with the code which treats ReferenceMany type fields as arrays.
The old code works perfectly until it uses array_slice.
Please let me know are there any workarounds for this or probably you guys are going to implement some fix?
Thanks a lot!
Activity
Jonathan H. Wage
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Invalid [ 6 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=MODM-122, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
Hi, you need to pass an array so you can convert the iterator to an array with the iterator_to_array() method or call ->toArray() on the PersistentCollection. Then you can pass that array to array_slice()