Skip to content

Commit

Permalink
Fix #10974: ereg is deprecated in PHP 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
amyreese committed Oct 14, 2009
1 parent 6b05d47 commit f46bc27
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/soap/mantisconnect.php
Expand Up @@ -1356,7 +1356,7 @@ function mci_is_webservice_call( $p_service, $p_data )
$t_qs = $QUERY_STRING;
}

if ( isset( $t_qs ) && ereg( 'wsdl', $t_qs ) ){
if ( isset( $t_qs ) && preg_match( '/wsdl/', $t_qs ) ){
return false;
} else if ( $p_data == '' && $p_service->wsdl ) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion core/custom_field_api.php
Expand Up @@ -1148,7 +1148,7 @@ function custom_field_validate( $p_field_id, $p_value ) {
case CUSTOM_FIELD_TYPE_STRING:
// validate against regexp
if( !is_blank( $t_valid_regexp ) && !is_blank( $p_value ) ) {
$t_valid &= ereg( $t_valid_regexp, $p_value );
$t_valid &= preg_match( "/$t_valid_regexp/", $p_value );
}
// check string length
$t_valid &= ( 0 == $t_length_min ) || ( $t_length > $t_length_min );
Expand Down
4 changes: 2 additions & 2 deletions core/graphviz_api.php
Expand Up @@ -438,7 +438,7 @@ function _build_attribute_list( $p_attributes ) {
$t_result = array();

foreach( $p_attributes as $t_name => $t_value ) {
if( !ereg( "[a-zA-Z]+", $t_name ) ) {
if( !preg_match( "/[a-zA-Z]+/", $t_name ) ) {
continue;
}

Expand All @@ -463,7 +463,7 @@ function _build_attribute_list( $p_attributes ) {
*/
function _print_graph_defaults() {
foreach( $this->attributes as $t_name => $t_value ) {
if( !ereg( "[a-zA-Z]+", $t_name ) ) {
if( !preg_match( "/[a-zA-Z]+/", $t_name ) ) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion docbook/adminguide/en/customizing_mantis.sgml
Expand Up @@ -110,7 +110,7 @@
</para>
</listitem>
<listitem>
<para>Regular expression to use for validating user input (use <ulink url="http://www.php.net/ereg">ereg()</ulink> syntax).
<para>Regular expression to use for validating user input (use <ulink url="http://www.php.net/manual/en/reference.pcre.pattern.syntax.php">PCRE syntax</ulink>).
</para>
</listitem>
<listitem>
Expand Down

0 comments on commit f46bc27

Please sign in to comment.