php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58913 Wrong call to strpos() in SCA_CommentReader
Submitted: 2009-10-22 07:01 UTC Modified: 2013-02-16 16:19 UTC
From: mail at daniel-berlin dot de Assigned: rasmus (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.2.10 OS: Linux
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: mail at daniel-berlin dot de
New email:
PHP Version: OS:

 

 [2009-10-22 07:01 UTC] mail at daniel-berlin dot de
Description:
------------
When executing a simple soap call, I get this error:

strpos() expects parameter 3 to be long, string given in /usr/local/lib/SCA/SCA_CommentReader.php on line 385 

This trivial patch fixes it:

--- SCA_CommentReader.php.orig  2009-10-22 12:49:18.000000000 +0200
+++ SCA_CommentReader.php       2009-10-22 12:49:25.000000000 +0200
@@ -382,7 +382,7 @@
                 $words      = explode(" ", $targetLine);
                 for ($i = 0; $i < count($words); $i++) {
                     $word = trim($words[$i++]);
-                    if (strpos($word, $word, $bindingAnnotation) === 0) {
+                    if (strpos($word, $bindingAnnotation) === 0) {
                         $binding = substr($word, strlen($bindingAnnotation));
                         break;
                     }



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-16 16:19 UTC] rasmus@php.net
Automatic comment from SVN on behalf of rasmus
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=329489
Log: Fix bad strpos call. Fixes bug #58913
 [2013-02-16 16:19 UTC] rasmus@php.net
Fixed in svn
 [2013-02-16 16:19 UTC] rasmus@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: rasmus
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Jan 22 03:03:33 2022 UTC