-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Undefined variable: options in PHPExcel/Settings.php on line 384 #434
Comments
Either wait a couple of weeks till 1.8.1 stable release, or use the develop branch.... I'm currently final testing develop preparatory to a new release |
Hello, |
@MarkBaker Is 1.8.1 going to happen? Do you recommend to use master or develop branches instead? Thanks |
I am getting this issue as well. Is the 1.8.1 release happening soon? It's been ~6 months now. |
Also, not sure if this is a good solution, but to anyone else who can't wait for the update. I changed the file from this: public static function getLibXmlLoaderOptions()
{
if (is_null(self::$_libXmlLoaderOptions)) {
self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR);
}
@libxml_disable_entity_loader($options == (LIBXML_DTDLOAD | LIBXML_DTDATTR));
return self::$_libXmlLoaderOptions;
} // function getLibXmlLoaderOptions to this: public static function getLibXmlLoaderOptions()
{
if (is_null(self::$_libXmlLoaderOptions)) {
self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR);
}
@libxml_disable_entity_loader(self::$_libXmlLoaderOptions == (LIBXML_DTDLOAD | LIBXML_DTDATTR));
return self::$_libXmlLoaderOptions;
} // function getLibXmlLoaderOptions Seemed to get rid of the error for me. |
I get this as a Fatal error on the develop branch but NOT on the 1.8.1 tag. |
I am not working on a project that makes use of the library, so I cant test right now. Thanks! |
I would say this issue shouldn't be closed yet if this error is showing on the develop branch. From what I read on their Contributing Instructions develop is supposed to be the working copy to branch from and should be most up to date. If that's true it means that the next tag after 1.8.1 will contain this bug again. I didn't get to dig into what is actually happening there, but it may be something with switching from |
@MarkBaker can you advise on that? |
Open up the PHPExcel_Settings class (Classes/PHPExcel/Settings.php) and see lines
to this
That seemed to solve the problem for me |
@chordstricken Yes, that is what I was saying; however, I was worried why the variable names changed and if merely changing those three places would effect anything else. After looking at that file I found the following commit 4f8c9bf by @MarkBaker which is merely a PSR code change and seems to not catch all instances of the variable This is a little scare because it makes me extremely weary of that commit and what else it may have broken. |
Change line 379 in Settings.php This worked for me! |
The original bug was fixed in 1.8.1 which was released a while ago. The rest of the mentioned bugs were fixed in https://github.com/PHPOffice/PhpSpreadsheet develop branch |
Notice: Undefined variable: zipClass in /var/www/vhost/timesheet.grazitti.com/html/PHPExcel/Writer/Excel2007.php on line 227 Fatal error: Uncaught Error: Class name must be a valid object or a string in /var/www/vhost/timesheet.grazitti.com/html/PHPExcel/Writer/Excel2007.php:227 Stack trace: #0 /var/www/vhost/timesheet.grazitti.com/html/admin_report_specific_user.php(764): PHPExcel_Writer_Excel2007->save('/tmp/phpxltmpF0...') #1 {main} thrown in /var/www/vhost/timesheet.grazitti.com/html/PHPExcel/Writer/Excel2007.php on line 227 I am getting this issue. Please let me know solution and i am using 1.8.1 version. |
@seemas-grazitti, please do not copy-paste your issue report in other threads. |
I am receiving this error message:
PHP Notice: Undefined variable: options in /path/to/my/project/vendor/phpoffice/phpexcel/Classes/PHPExcel/Settings.php on line 384
It seems it has been fixed in the
develop
branch, but it is not merged to the last stable tag - 1.8.0.Can you advise on how to get the fix?
The text was updated successfully, but these errors were encountered: