Bug #71434 [Ana->Csd]: finfo throws notice for specific python file

From: Date: Mon, 25 Jan 2016 03:50:45 +0000
Subject: Bug #71434 [Ana->Csd]: finfo throws notice for specific python file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198868@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71434&edit=1 ID: 71434 Updated by: laruence@php.net Reported by: bluewind at xinu dot at Summary: finfo throws notice for specific python file -Status: Analyzed +Status: Closed Type: Bug Package: Filesystem function related Operating System: Arch Linux PHP Version: 7.0.2 Block user comment: N Private report: N New Comment: Automatic comment on behalf of laruence@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=da7f42de38e02f49aa156d4717385f9a157222ce Log: Fixed bug #71434 (finfo throws notice for specific python file) Previous Comments: ------------------------------------------------------------------------ [2016-01-24 16:17:46] laruence@php.net This seems a little weird , the origin problem is in 5.6 branch: https://github.com/php/php-src/commit/46906925#diff-56e765972d18c84894ea061cfe58076aR1757 if (zend_hash_has_more_elements_ex(ht, &outer_pos) == SUCCESS && zend_hash_move_forward_ex(ht, &outer_pos)) { } the zend_hash_move_forward_ex(ht, &outer_pos) should return SUCCESS(0) on okey. but this condition seems expect it return FAILURE... not sure, what does it really want to do here :< thanks ------------------------------------------------------------------------ [2016-01-22 18:49:03] bluewind at xinu dot at Description: ------------ Finfo and releated functions throw a Notice for certain files when using php 7.0.2. This is not the case when using 5.6.17. Test script: --------------- <?php $a='#!env python # -*- coding:utf-8 -*- from serial import Serial from sys import exit '; $finfo = new finfo(FILEINFO_MIME_TYPE); echo $finfo->buffer($a) . "\n"; Expected result: ---------------- text/x-python Actual result: -------------- Notice: Array to string conversion in /home/flo/test.php on line 9 text/x-python ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71434&edit=1

« previous php.bugs (#198868) next »