php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81552 xdiff_string_bpatch() and others missing
Submitted: 2021-10-25 09:31 UTC Modified: 2021-10-25 13:51 UTC
From: pleasestand at live dot com Assigned:
Status: Verified Package: xdiff (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pleasestand at live dot com
New email:
PHP Version: OS:

 

 [2021-10-25 09:31 UTC] pleasestand at live dot com
Description:
------------
In PECL xdiff 2.1.0, the arginfo is now generated from a stub file. Unfortunately, the stub file includes the aliases but leaves out the actual names for the following functions:

xdiff_file_bdiff()
xdiff_file_bpatch()
xdiff_string_bdiff()
xdiff_string_bpatch()

This breaks scripts that call these functions using their actual names as opposed to the aliases ("_binary" at the end instead of "b"). The bug was introduced in the following commit:

https://github.com/php/pecl-text-xdiff/commit/7e762e743e8607d2007a02382d2c845a7a5b8682

Test script:
---------------
<?php
$s1 = 'The quick brown fox jumps over the lazy dog.';
$s2 = 'The quick brown fox jumps over the lazy cog.';
var_dump(xdiff_string_bpatch($s1, xdiff_string_bdiff($s1, $s2)));

Expected result:
----------------
string(44) "The quick brown fox jumps over the lazy cog."

Actual result:
--------------
PHP Fatal error:  Uncaught Error: Call to undefined function xdiff_string_bpatch() in /home/ki/test.php:4
Stack trace:
#0 {main}
  thrown in /home/ki/test.php on line 4

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-10-25 09:48 UTC] pleasestand at live dot com
The following pull request has been associated:

Patch Name: Fixed bug #81552 (xdiff_string_bpatch() and others missing)
On GitHub:  https://github.com/php/pecl-text-xdiff/pull/6
Patch:      https://github.com/php/pecl-text-xdiff/pull/6.patch
 [2021-10-25 13:51 UTC] cmb@php.net
-Status: Open +Status: Verified
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Dec 05 15:03:33 2021 UTC