PageRenderTime 382ms queryFilters 0ms Sphinxql 179ms app.CodeModel.GetByIds 150ms findMatchingLines 27ms GetByIds 177ms meta 0ms repositoryFilters 6ms languageFilters 3ms sourceFilters 3ms

421,407 results for 'php empty repo:dadyday/template' (382 ms)

Source

Language

Repository

config.inc.php https://bitbucket.org/enurkov/prestashop.git | PHP | 197 lines
1<?php
2/*
22*  @copyright  2007-2012 PrestaShop SA
23*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
24*  International Registered Trademark & Property of PrestaShop SA
26
27require_once(dirname(__FILE__).'/defines.inc.php');
28$start_time = microtime(true);
32
33/* Improve PHP configuration to prevent issues */
34ini_set('upload_max_filesize', '100M');
42/* No settings file? goto installer... */
43if (!file_exists(dirname(__FILE__).'/settings.inc.php'))
44{
70	{
71		if (basename($_SERVER['SCRIPT_NAME']) == 'index.php' && empty($_SERVER['QUERY_STRING']))
72			$_SERVER['REQUEST_URI'] = dirname($_SERVER['SCRIPT_NAME']).'/';
institutions.php https://github.com/ybozhko/phd-mahara.git | PHP | 654 lines
33define('SECTION_PAGE', 'institutions');
34require_once('pieforms/pieform.php');
35define('MENUITEM', 'manageinstitutions/institutions');
50    $delete = false;
51    if (!empty($institution) && !$USER->is_institutional_admin($institution)) {
52        $institution = '';
54    }
55    if (empty($institution) && count($USER->get('admininstitutions')) == 1) {
56        redirect(get_config('wwwroot') . 'admin/users/institutions.php?i='
350    // Get a list of institutions
351    require_once(get_config('libroot') . 'institution.php');
352    if (!$USER->get('admin')) { // Filter the list for institutional admins
619function search_submit(Pieform $form, $values) {
620    redirect('/admin/users/institutions.php' . (!empty($values['query']) ? '?query=' . urlencode($values['query']) : ''));
621}
expedition.class.php https://github.com/asterix14/dolibarr.git | PHP | 1,204 lines
1<?php
2/* Copyright (C) 2003-2008 Rodolphe Quiedeville  <rodolphe@quiedeville.org>
28require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
29if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
30if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
105
106	    if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
107        {
110
111		$file = $conf->global->EXPEDITION_ADDON_NUMBER.".php";
112
319		// Check parameters
320		if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1;
321
1152			$url='';
1153			if (file_exists(DOL_DOCUMENT_ROOT."/core/modules/expedition/methode_expedition_".strtolower($code).".modules.php") && ! empty($this->tracking_number))
1154			{
readme.md https://github.com/michaelcaplan/Carbon.git | Unknown | 647 lines
114
115The Carbon class is [inherited](http://php.net/manual/en/keyword.extends.php) from the PHP [DateTime](http://www.php.net/manual/en/class.datetime.php) class.
116
142
143There are several different methods available to create a new instance of Carbon.  First there is a constructor.  It overrides the [parent constructor](http://www.php.net/manual/en/datetime.construct.php) and you are best to read about the first parameter from the PHP manual and understand the date/time string formats it accepts.  You'll hopefully find yourself rarely using the constructor but rather relying on the explicit static methods for improved readability.
144
198
199`createFromFormat()` is mostly a wrapper for the base php function [DateTime::createFromFormat](http://php.net/manual/en/datetime.createfromformat.php).  The difference being again the `$tz` argument can be a DateTimeZone instance or a string timezone value.  Also, if there are errors with the format this function will call the `DateTime::getLastErrors()` method and then throw a `InvalidArgumentException` with the errors as the message.  If you look at the source for the `createXX()` functions above, they all make a call to `createFromFormat()`.
200
316
317The PHP function `__isset()` is implemented.  This was done as some external systems (ex. [Twig](http://twig.sensiolabs.org/doc/recipes.html#using-dynamic-object-properties)) validate the existence of a property before using it.  This is done using the `isset()` or `empty()` method.  You can read more about these on the PHP site: [__isset()](http://www.php.net/manual/en/language.oop5.overloading.php#object.isset), [isset()](http://www.php.net/manual/en/function.isset.php), [empty()](http://www.php.net/manual/en/function.empty.php).
318
583
584Change the `readme.src.md` and then use the `readme.php` to generate the new `readme.md` file.  It can be run at the command line using `php readme.php` from the project root.  Maybe someday I'll extract this out to another project or at least run it with a post receive hook, but for now its just a local tool, deal with it.
585
readme.src.md https://github.com/michaelcaplan/Carbon.git | Unknown | 663 lines
118
119The Carbon class is [inherited](http://php.net/manual/en/keyword.extends.php) from the PHP [DateTime](http://www.php.net/manual/en/class.datetime.php) class.
120
146
147There are several different methods available to create a new instance of Carbon.  First there is a constructor.  It overrides the [parent constructor](http://www.php.net/manual/en/datetime.construct.php) and you are best to read about the first parameter from the PHP manual and understand the date/time string formats it accepts.  You'll hopefully find yourself rarely using the constructor but rather relying on the explicit static methods for improved readability.
148
206
207`createFromFormat()` is mostly a wrapper for the base php function [DateTime::createFromFormat](http://php.net/manual/en/datetime.createfromformat.php).  The difference being again the `$tz` argument can be a DateTimeZone instance or a string timezone value.  Also, if there are errors with the format this function will call the `DateTime::getLastErrors()` method and then throw a `InvalidArgumentException` with the errors as the message.  If you look at the source for the `createXX()` functions above, they all make a call to `createFromFormat()`.
208
328
329The PHP function `__isset()` is implemented.  This was done as some external systems (ex. [Twig](http://twig.sensiolabs.org/doc/recipes.html#using-dynamic-object-properties)) validate the existence of a property before using it.  This is done using the `isset()` or `empty()` method.  You can read more about these on the PHP site: [__isset()](http://www.php.net/manual/en/language.oop5.overloading.php#object.isset), [isset()](http://www.php.net/manual/en/function.isset.php), [empty()](http://www.php.net/manual/en/function.empty.php).
330
599
600Change the `readme.src.md` and then use the `readme.php` to generate the new `readme.md` file.  It can be run at the command line using `php readme.php` from the project root.  Maybe someday I'll extract this out to another project or at least run it with a post receive hook, but for now its just a local tool, deal with it.
601
update-core.php https://bitbucket.org/acipriani/madeinapulia.com | PHP | 660 lines
53		} else {
54			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
55			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
60			if ( !$mysql_compat && !$php_compat )
61				$message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );
62			elseif ( !$php_compat )
62			elseif ( !$php_compat )
63				$message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version );
64			elseif ( !$mysql_compat )
155				'version'       => $wp_version . '.1.next.minor',
156				'php_version'   => $required_php_version,
157				'mysql_version' => $required_mysql_version,
435	<script type="text/javascript">
436	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
437	</script>
update-core.php https://bitbucket.org/acipriani/madeinapulia.com | PHP | 1,188 lines
823
824	$php_version    = phpversion();
825	$mysql_version  = $wpdb->db_version();
827	$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
828	$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
829	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
837	if ( !$mysql_compat && !$php_compat )
838		return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) );
839	elseif ( !$php_compat )
839	elseif ( !$php_compat )
840		return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ) );
841	elseif ( !$mysql_compat )
912	if ( ! is_wp_error( $result ) ) {
913		if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) {
914			$wp_filesystem->delete( $from, true );
class.types.php https://bitbucket.org/acipriani/madeinapulia.com | PHP | 539 lines
1<?php
2/**
4 *
5 * $HeadURL: https://www.onthegosystems.com/misc_svn/common/tags/Views-1.6.4-CRED-1.3.2-Types-1.6.4-Acces-1.2.3/toolset-forms/classes/class.types.php $
6 * $LastChangedDate: 2014-09-11 14:31:16 +0000 (Thu, 11 Sep 2014) $
78                    $field['name'] ), // Translated title
79            'description' => !empty( $field['description'] ) ? self::translate( "field {$field['id']} description",
80                    $field['description'] ) : '', // Translated description
99        case 'checkboxes':
100            if ( !empty( $field['data']['options'] ) ) {
101                global $pagenow;
109                    );
110                    if ( $pagenow == 'post-new.php' && !empty( $option['checked'] ) ) {
111                        $_field['options'][$option_key]['checked'] = true;
116        case 'date':
117            $_field['add_time'] = !empty( $field['data']['date_and_time'] ) && $field['data']['date_and_time'] == 'and_time';
118            break;
update-core.php https://bitbucket.org/Thane2376/death-edge.ru.git | PHP | 650 lines
53		} else {
54			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
55			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
60			if ( !$mysql_compat && !$php_compat )
61				$message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );
62			elseif ( !$php_compat )
62			elseif ( !$php_compat )
63				$message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version );
64			elseif ( !$mysql_compat )
155				'version'       => $wp_version . '.1.next.minor',
156				'php_version'   => $required_php_version,
157				'mysql_version' => $required_mysql_version,
425	<script type="text/javascript">
426	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
427	</script>
update-core.php https://bitbucket.org/Thane2376/death-edge.ru.git | PHP | 1,152 lines
787
788	$php_version    = phpversion();
789	$mysql_version  = $wpdb->db_version();
791	$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
792	$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
793	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
801	if ( !$mysql_compat && !$php_compat )
802		return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) );
803	elseif ( !$php_compat )
803	elseif ( !$php_compat )
804		return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ) );
805	elseif ( !$mysql_compat )
876	if ( ! is_wp_error( $result ) ) {
877		if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) {
878			$wp_filesystem->delete( $from, true );
Validator.php https://github.com/FrediL/yii2.git | PHP | 367 lines
1<?php
2/**
125    /**
126     * @var callable a PHP callable that replaces the default implementation of [[isEmpty()]].
127     * If not set, [[isEmpty()]] will be used to check if a value is empty. The signature
130     */
131    public $isEmpty;
132    /**
132    /**
133     * @var callable a PHP callable whose return value determines whether this validator should be applied.
134     * The signature of the callable should be `function ($model, $attribute)`, where `$model` and `$attribute`
235            $skip = $this->skipOnError && $object->hasErrors($attribute)
236                || $this->skipOnEmpty && $this->isEmpty($object->$attribute);
237            if (!$skip) {
352     * Checks if the given value is empty.
353     * A value is considered empty if it is null, an empty array, or the trimmed result is an empty string.
354     * Note that this method is different from PHP empty(). It will return false when the value is 0.
Validator.php https://github.com/lucianobaraglia/yii2.git | PHP | 367 lines
1<?php
2/**
128    /**
129     * @var callable a PHP callable that replaces the default implementation of [[isEmpty()]].
130     * If not set, [[isEmpty()]] will be used to check if a value is empty. The signature
133     */
134    public $isEmpty;
135    /**
135    /**
136     * @var callable a PHP callable whose return value determines whether this validator should be applied.
137     * The signature of the callable should be `function ($model, $attribute)`, where `$model` and `$attribute`
234            $skip = $this->skipOnError && $model->hasErrors($attribute)
235                || $this->skipOnEmpty && $this->isEmpty($model->$attribute);
236            if (!$skip) {
352     * Checks if the given value is empty.
353     * A value is considered empty if it is null, an empty array, or the trimmed result is an empty string.
354     * Note that this method is different from PHP empty(). It will return false when the value is 0.
class.types.php https://github.com/ngocphuuit/wordpress-tax.git | PHP | 497 lines
1<?php
2/**
4 *
5 * $HeadURL: https://www.onthegosystems.com/misc_svn/common/tags/Views-1.6.1-Types-1.5.7/toolset-forms/classes/class.types.php $
6 * $LastChangedDate: 2014-04-16 10:42:22 +0200 (Wed, 16 Apr 2014) $
78                    $field['name'] ), // Translated title
79            'description' => !empty( $field['description'] ) ? self::translate( "field {$field['id']} description",
80                    $field['description'] ) : '', // Translated description
99        case 'checkboxes':
100            if ( !empty( $field['data']['options'] ) ) {
101                global $pagenow;
109                    );
110                    if ( $pagenow == 'post-new.php' && !empty( $option['checked'] ) ) {
111                        $_field['options'][$option_key]['checked'] = true;
116        case 'date':
117            $_field['add_time'] = !empty( $field['data']['date_and_time'] ) && $field['data']['date_and_time'] == 'and_time';
118            break;
update-core.php https://github.com/markjaquith/WordPress.git | PHP | 729 lines
51	$form_action = 'update-core.php?action=do-core-upgrade';
52	$php_version    = phpversion();
53	$mysql_version  = $wpdb->db_version();
63		} else {
64			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
65			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
70			if ( !$mysql_compat && !$php_compat )
71				$message = sprintf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );
72			elseif ( !$php_compat )
72			elseif ( !$php_compat )
73				$message = sprintf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version );
74			elseif ( !$mysql_compat )
170				'version'       => $wp_version . '.1.next.minor',
171				'php_version'   => $required_php_version,
172				'mysql_version' => $required_mysql_version,
update-core.php https://github.com/markjaquith/WordPress.git | PHP | 1,314 lines
857
858	$php_version    = phpversion();
859	$mysql_version  = $wpdb->db_version();
861	$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
862	$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
863	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
871	if ( !$mysql_compat && !$php_compat )
872		return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) );
873	elseif ( !$php_compat )
873	elseif ( !$php_compat )
874		return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ) );
875	elseif ( !$mysql_compat )
946	if ( ! is_wp_error( $result ) ) {
947		if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) {
948			$wp_filesystem->delete( $from, true );
update-core.php https://gitlab.com/math4youbyusgroupillinois/WordPress.git | PHP | 1,190 lines
826
827	$php_version    = phpversion();
828	$mysql_version  = $wpdb->db_version();
830	$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
831	$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
832	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
840	if ( !$mysql_compat && !$php_compat )
841		return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) );
842	elseif ( !$php_compat )
842	elseif ( !$php_compat )
843		return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ) );
844	elseif ( !$mysql_compat )
915	if ( ! is_wp_error( $result ) ) {
916		if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) {
917			$wp_filesystem->delete( $from, true );
update-core.php https://gitlab.com/jessehall/hudson_alpha.git | PHP | 649 lines
53		} else {
54			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
55			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
60			if ( !$mysql_compat && !$php_compat )
61				$message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );
62			elseif ( !$php_compat )
62			elseif ( !$php_compat )
63				$message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version );
64			elseif ( !$mysql_compat )
155				'version'       => $wp_version . '.1.next.minor',
156				'php_version'   => $required_php_version,
157				'mysql_version' => $required_mysql_version,
425	<script type="text/javascript">
426	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
427	</script>
update-core.php https://gitlab.com/jessehall/hudson_alpha.git | PHP | 1,151 lines
787
788	$php_version    = phpversion();
789	$mysql_version  = $wpdb->db_version();
791	$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
792	$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
793	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
801	if ( !$mysql_compat && !$php_compat )
802		return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) );
803	elseif ( !$php_compat )
803	elseif ( !$php_compat )
804		return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ) );
805	elseif ( !$mysql_compat )
876	if ( ! is_wp_error( $result ) ) {
877		if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) {
878			$wp_filesystem->delete( $from, true );
update-core.php https://gitlab.com/geyson/geyson.git | PHP | 694 lines
63		} else {
64			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
65			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
70			if ( !$mysql_compat && !$php_compat )
71				$message = sprintf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );
72			elseif ( !$php_compat )
72			elseif ( !$php_compat )
73				$message = sprintf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version );
74			elseif ( !$mysql_compat )
170				'version'       => $wp_version . '.1.next.minor',
171				'php_version'   => $required_php_version,
172				'mysql_version' => $required_mysql_version,
463	<script type="text/javascript">
464	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
465	</script>
update-core.php https://bitbucket.org/broderboy/shannonbroder-wordpress | PHP | 1,149 lines
787
788	$php_version    = phpversion();
789	$mysql_version  = $wpdb->db_version();
791	$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
792	$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
793	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
801	if ( !$mysql_compat && !$php_compat )
802		return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) );
803	elseif ( !$php_compat )
803	elseif ( !$php_compat )
804		return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ) );
805	elseif ( !$mysql_compat )
876	if ( ! is_wp_error( $result ) ) {
877		if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) {
878			$wp_filesystem->delete( $from, true );
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21