note 78321 modified in function.stristr by danbrown

From: Date: Fri, 28 Nov 2008 20:06:37 +0000
Subject: note 78321 modified in function.stristr by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147177@lists.php.net to get a copy of this message
Just been caught out by stristr trying to converting the needle from an Int to an ASCII value. Got round this by casting the value to a string. <?php if( !stristr( $file, (string) $myCustomer->getCustomerID() ) ) { // Permission denied } ?> --was-- Just been caught out by stristr trying to converting the needle from an Int to an ASCII value. Got round this by casting the value to a string. if( !stristr( $file, (string) $myCustomer->getCustomerID() ) ) { // Permission denied } http://php.net/manual/en/function.stristr.php

« previous php.notes (#147177) next »