Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydrator Error when using Doctrine_Pager #28

Open
wildanm opened this issue Mar 18, 2017 · 0 comments
Open

Hydrator Error when using Doctrine_Pager #28

wildanm opened this issue Mar 18, 2017 · 0 comments

Comments

@wildanm
Copy link

wildanm commented Mar 18, 2017

When using Doctrine_Pager i got this error :

2017/03/18 10:45:24 [error] 4715#4715: *118 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function getLast() on boolean in ....lib/vendor/lexpress/doctrine1/lib/Doctrine/Hydrator/RecordDriver.php:110
Stack trace:
#0 .../lib/vendor/lexpress/doctrine1/lib/Doctrine/Hydrator/Graph.php(269): Doctrine_Hydrator_RecordDriver->setLastElement(Array, false, false, 'nilai', true)
#1 ...

The error is gone with this simple fix in : lib/vendor/lexpress/doctrine1/lib/Doctrine/Hydrator/RecordDriver.php:110

But i'm not sure, if this is the proper solution.

        if (count($coll) > 0) {
			if($prev[$dqlAlias] == null) {
				return ;
			} else {
              $prev[$dqlAlias] = $coll->getLast();
		    }
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant