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

Fix fatal error on Phar task (and more) #184

Merged
merged 1 commit into from Jan 11, 2013
Merged

Fix fatal error on Phar task (and more) #184

merged 1 commit into from Jan 11, 2013

Conversation

llaville
Copy link
Contributor

When the metadata is missing (that is possible, because its optional with phar php extension), we got a FATAL error.

Fatal error: Call to a member function toArray() on a non-object 
in phing\tasks\ext\phar\PharPackageTask.php on line 352

You can reproduce this issue with this phing test file

<?xml version="1.0" encoding="UTF-8"?>
<project name="phar" description="Build phar archive" default="do">

    <property name="phar.basedir"    value="${env.TMP}/${phing.project.name}" />
    <property name="phar.destfile"   value="myproject.phar" />

    <target name="do">
        <mkdir dir="${phar.basedir}" />

        <pharpackage
            basedir="${phar.basedir}"
            destfile="${phar.destfile}"
        >
            <fileset dir="${phar.basedir}" />
        </pharpackage>
    </target>

</project>    

I've also introduce some code clean-up (whitespaces), added some phpdoc descriptions missing, prevent error for PHP 5.2 users (check extension loaded)

And at least fix the fatal error.

  • Laurent

mrook added a commit that referenced this pull request Jan 11, 2013
Fix fatal error on Phar task (and more)
@mrook mrook merged commit 6a56577 into phingofficial:master Jan 11, 2013
@llaville llaville deleted the phar branch January 14, 2013 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants