You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. m:n relation
2. staticaly call relation with _first or "limit"=>1 option
What is the expected output? What do you see instead?
dooframework/db/DooSqlMagic.php(1462) calling array_splice()
array_splice() expects parameter 2 to be long, string given
What version of the product are you using? On what operating system?
Path: doophp-read-only/dooframework/db/DooSqlMagic.php
Name: DooSqlMagic.php
URL: http://doophp.googlecode.com/svn/trunk/dooframework/db/DooSqlMagic.php
Repository Root: http://doophp.googlecode.com/svn
Repository UUID: eaaf3d48-7251-11de-8585-3f51e31374b7
Revision: 717
Node Kind: file
Schedule: normal
Last Changed Author: richard.myers@hotmail.co.uk
Last Changed Rev: 711
Last Changed Date: 2012-04-22 17:44:29 +0200 (Ne, 22 dub 2012)
Text Last Updated: 2012-11-15 19:11:30 +0100 (Čt, 15 lis 2012)
Checksum: 4d84ff3bc7cc81842b089a74e5df24fb
Please provide any additional information below.
I found two problems with condition on row 1418
if($opt['limit']==1 || $opt['limit']=='first'){
$opt['limit'] = 'first';
$limitstr = 1;
}else{
$limitstr = $opt['limit'];
}
first:
$opt['limit'] = 'first'; is forced to set to 'first' when you limiting query
to 1
but its used late as offset for array_splice.
$limitLength = explode(',', $opt['limit']);
if(isset($limitLength[1])){
array_splice($limitModelStr, $limitLength[1]);
}else{
array_splice($limitModelStr, $limitLength[0]);
}
second issue:
when you use limit range like "1,2", its converted to integer, so you get same
issue.
Original issue reported on code.google.com by Hoca.Nas...@gmail.com on 17 Nov 2012 at 1:35
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
Hoca.Nas...@gmail.com
on 17 Nov 2012 at 1:35The text was updated successfully, but these errors were encountered: