Skip to content
This repository was archived by the owner on Sep 5, 2018. It is now read-only.

Declare a variable explicitly in order to prevent from E_NOTICE #19

Merged
merged 1 commit into from
Apr 1, 2015
Merged

Conversation

aazon
Copy link
Contributor

@aazon aazon commented Apr 1, 2015

We have a lot of notices like the following one:

PHP Notice:  Only variable references should be returned by reference in /path_to_project/vendor/fieryprophet/php-sandbox/src/functions.php on line 44

We are running php 5.6:

php -v
PHP 5.6.5 (cli) (built: Jan 21 2015 17:50:29)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

Looks like php does not like return new Foo() in functions like &wrapByRef and wants some variable to be returned instead.

fieryprophet added a commit that referenced this pull request Apr 1, 2015
Declare a variable explicitly in order to prevent from E_NOTICE
@fieryprophet fieryprophet merged commit 5e330cc into fieryprophet:master Apr 1, 2015
@fieryprophet
Copy link
Owner

I appreciate the pull request and have incorporated it into the latest build.

This was referenced Jun 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants