PageRenderTime 73ms queryFilters 0ms Sphinxql 1690ms GetByIds 316ms meta 0ms repositoryFilters 38ms languageFilters 8ms sourceFilters 49ms

501,203 results for 'php empty' (73 ms)

Source

Language

Repository

update-core.php https://bitbucket.org/frnco/scripts.git | PHP | 541 lines
46		} else {
47			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
48			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
53			if ( !$mysql_compat && !$php_compat )
54				$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 );
55			elseif ( !$php_compat )
55			elseif ( !$php_compat )
56				$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 );
57			elseif ( !$mysql_compat )
109			$('dismissed-updates').show();
110			$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
111			$('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');});
387	<script type="text/javascript">
388	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
389	</script>
update-core.php https://bitbucket.org/erickjones/aotopo.git | PHP | 546 lines
46		} else {
47			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
48			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
53			if ( !$mysql_compat && !$php_compat )
54				$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 );
55			elseif ( !$php_compat )
55			elseif ( !$php_compat )
56				$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 );
57			elseif ( !$mysql_compat )
109			$('dismissed-updates').show();
110			$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
111			$('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');});
361	<script type="text/javascript">
362	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
363	</script>
update-core.php https://bitbucket.org/reynaldo_pg_86/overcast.git | PHP | 541 lines
46		} else {
47			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
48			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
53			if ( !$mysql_compat && !$php_compat )
54				$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 );
55			elseif ( !$php_compat )
55			elseif ( !$php_compat )
56				$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 );
57			elseif ( !$mysql_compat )
109			$('dismissed-updates').show();
110			$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
111			$('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');});
387	<script type="text/javascript">
388	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
389	</script>
update-core.php https://bitbucket.org/midasinc/your-submission.git | PHP | 546 lines
46		} else {
47			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
48			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
53			if ( !$mysql_compat && !$php_compat )
54				$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 );
55			elseif ( !$php_compat )
55			elseif ( !$php_compat )
56				$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 );
57			elseif ( !$mysql_compat )
109			$('dismissed-updates').show();
110			$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
111			$('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');});
361	<script type="text/javascript">
362	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
363	</script>
update-core.php https://bitbucket.org/gregbenner/the-league-of-gentlemen-theme.git | PHP | 546 lines
46		} else {
47			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
48			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
53			if ( !$mysql_compat && !$php_compat )
54				$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 );
55			elseif ( !$php_compat )
55			elseif ( !$php_compat )
56				$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 );
57			elseif ( !$mysql_compat )
109			$('dismissed-updates').show();
110			$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
111			$('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');});
361	<script type="text/javascript">
362	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
363	</script>
update-core.php https://github.com/flyingnn/yoTheme.git | PHP | 541 lines
46		} else {
47			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
48			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
53			if ( !$mysql_compat && !$php_compat )
54				$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 );
55			elseif ( !$php_compat )
55			elseif ( !$php_compat )
56				$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 );
57			elseif ( !$mysql_compat )
109			$('dismissed-updates').show();
110			$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
111			$('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');});
387	<script type="text/javascript">
388	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
389	</script>
update-core.php https://bitbucket.org/mihteh/mihteh.com-wp | PHP | 541 lines
46		} else {
47			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
48			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
53			if ( !$mysql_compat && !$php_compat )
54				$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 );
55			elseif ( !$php_compat )
55			elseif ( !$php_compat )
56				$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 );
57			elseif ( !$mysql_compat )
109			$('dismissed-updates').show();
110			$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
111			$('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');});
387	<script type="text/javascript">
388	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
389	</script>
update-core.php https://bitbucket.org/chimbien/mekongtest.git | PHP | 546 lines
46		} else {
47			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
48			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
53			if ( !$mysql_compat && !$php_compat )
54				$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 );
55			elseif ( !$php_compat )
55			elseif ( !$php_compat )
56				$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 );
57			elseif ( !$mysql_compat )
109			$('dismissed-updates').show();
110			$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
111			$('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');});
361	<script type="text/javascript">
362	window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
363	</script>
document.php https://github.com/zeert/dolibarr.git | PHP | 172 lines
1<?php
2/* Copyright (C) 2003-2007 Rodolphe Quiedeville  <rodolphe@quiedeville.org>
28
29require("../main.inc.php");
30require_once(DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php");
30require_once(DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php");
31require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
32require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
32require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
33require_once(DOL_DOCUMENT_ROOT."/core/lib/fichinter.lib.php");
34require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
73
74if (GETPOST('sendit','alpha') && ! empty($conf->global->MAIN_UPLOAD_DOC))
75{
127
128    $linkback = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
129
contact.php https://github.com/zeert/dolibarr.git | PHP | 205 lines
1<?php
2/* Copyright (C) 2005      Patrick Rouillon     <patrick@rouillon.net>
26
27require("../../main.inc.php");
28require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
28require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
29require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
30require_once(DOL_DOCUMENT_ROOT.'/core/class/discount.class.php');
30require_once(DOL_DOCUMENT_ROOT.'/core/class/discount.class.php');
31require_once(DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php');
32require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
65	{
66		Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
67		exit;
146
147		$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
148
upgrade.php https://github.com/jinbo51/DiscuzX.git | PHP | 119 lines
6 *
7 *      $Id: install.php 27070 2012-01-04 05:55:20Z songlixin $
8 */
55$table = DB::table('common_plugin');
56include DISCUZ_ROOT . 'source/language/lang_admincp_cloud.php';
57$format = "UPDATE $table SET name = '%s' WHERE identifier = 'security'";
62$cronId_security_daily = $cronId_security_lastpost = 0;
63if(file_exists(DISCUZ_ROOT . './source/include/cron/cron_security_cleanup_lastpost.php') || file_exists(DISCUZ_ROOT . './source/include/cron/cron_security_daily.php')) {
64	$count = C::t('common_cron')->count();
66	foreach ($oldData as $value) {
67		if ($value['filename'] == 'cron_security_daily.php') {
68			$cronId_security_daily = $value['cronid'];
73}
74if(file_exists(DISCUZ_ROOT . './source/include/cron/cron_security_cleanup_lastpost.php') && empty($cronId_security_lastpost)) {
75	$data = array(
install.php https://github.com/jinbo51/DiscuzX.git | PHP | 123 lines
6 *
7 *      $Id: install.php 33344 2013-05-30 04:37:03Z jeffjzhang $
8 */
64$cronId_security_daily = $cronId_security_lastpost = 0;
65if(file_exists(DISCUZ_ROOT . './source/include/cron/cron_security_cleanup_lastpost.php') || file_exists(DISCUZ_ROOT . './source/include/cron/cron_security_daily.php')) {
66	$count = C::t('common_cron')->count();
68	foreach ($oldData as $value) {
69		if ($value['filename'] == 'cron_security_daily.php') {
70			$cronId_security_daily = $value['cronid'];
70			$cronId_security_daily = $value['cronid'];
71		}elseif ($value['filename'] == 'cron_security_cleanup_lastpost.php') {
72			$cronId_security_lastpost = $value['cronid'];
76include DISCUZ_ROOT . 'source/language/lang_admincp_cloud.php';
77if(file_exists(DISCUZ_ROOT . './source/include/cron/cron_security_cleanup_lastpost.php') && empty($cronId_security_lastpost)) {
78	$data = array(
checkboxes.php https://bitbucket.org/acipriani/madeinapulia.com | PHP | 368 lines
40                '#default_value' => (!empty( $field['value'][$option_key] )// Also check new post
41                || ($pagenow == 'post-new.php' && !empty( $option['checked'] ))) ? 1 : 0,
42                '#name' => 'wpcf[' . $field['id'] . '][' . $option_key . ']',
185            if ( $option['display'] == 'db'
186                    && !empty( $option['set_value'] ) && !empty( $value ) ) {
187                $value = $option['set_value'];
204        $output = implode( array_values( $params['field_value'] ), $separator );
205        return empty( $output ) ? '__wpcf_skip_empty' : stripslashes($output);
206    }
230    if ( isset( $params['state'] ) ) {
231        $content = !empty( $params['#content'] ) ? htmlspecialchars_decode( $params['#content'] ) : '__wpcf_skip_empty';
232        if ( $params['state'] == 'checked'
250     * Only set if it matches settings.
251     * Otherwise leave empty and '__wpcf_skip_empty' will be returned.
252     *
checkboxes.php https://github.com/ngocphuuit/wordpress-tax.git | PHP | 360 lines
40                '#default_value' => (!empty( $field['value'][$option_key] )// Also check new post
41                || ($pagenow == 'post-new.php' && !empty( $option['checked'] ))) ? 1 : 0,
42                '#name' => 'wpcf[' . $field['id'] . '][' . $option_key . ']',
185            if ( $option['display'] == 'db'
186                    && !empty( $option['set_value'] ) && !empty( $value ) ) {
187                $value = $option['set_value'];
204        $output = implode( array_values( $params['field_value'] ), $separator );
205        return empty( $output ) ? '__wpcf_skip_empty' : $output;
206    }
230    if ( isset( $params['state'] ) ) {
231        $content = !empty( $params['#content'] ) ? htmlspecialchars_decode( $params['#content'] ) : '__wpcf_skip_empty';
232        if ( $params['state'] == 'checked'
250     * Only set if it matches settings.
251     * Otherwise leave empty and '__wpcf_skip_empty' will be returned.
252     */
AbstractRest.php https://github.com/jkinner/ringside.git | PHP | 415 lines
1<?php
2/*******************************************************************************
26require_once ('ringside/api/db/RingsideApiDbDatabase.php');
27require_once ('ringside/api/bo/App.php');
28require_once ('ringside/api/OpenFBAPIException.php');
28require_once ('ringside/api/OpenFBAPIException.php');
29require_once( "ringside/api/ServiceFactory.php" );
30
210      $value = $default;
211      if ( isset($this->m_apiParams[$key]) && !$this->isEmpty($this->m_apiParams[$key])) 
212      {
287   /**
288    * Validate a given parameter is avialable and not empty.
289    *
384   /**
385    * PHP empty function causes '0', 0, Array(), and FALSE to return true.  These really are not empty
386    * to us, so instead we have our own isEmpty function that only returns true if the variable is
2015-12-13-php-empty-keys.md https://github.com/robertopedroso/robertopedroso.github.com.git | Markdown | 46 lines
2layout: post
3title: PHP Gotchas&#58; Null Array Keys
4---
9
10```php
11$table_id = 12345;
26
27```php
28$data = [
34
35I was dumbstruck -- I had no idea PHP allows array keys to be empty strings. I eventually discovered the cause, which only doubled my bewilderment. See, all our Account API input passes through a customized input sanitizer. It eventually performs an operation like this:
36
40
41Simple enough, right? Except there was a bug related to an edge case that caused $key to never get set. PHP threw a warning but happily chugged along, substuting NULL for our key. It then cast null to an empty string and added that element to the array, resulting in the bizarre array we saw before.
42
condition.php git://github.com/moodle/moodle.git | PHP | 618 lines
52    /** @var string Operator: field is empty */
53    const OP_IS_EMPTY = 'isempty';
54
55    /** @var string Operator: field is not empty */
56    const OP_IS_NOT_EMPTY = 'isnotempty';
57
82                self::OP_DOES_NOT_CONTAIN, self::OP_IS_EQUAL_TO, self::OP_STARTS_WITH,
83                self::OP_ENDS_WITH, self::OP_IS_EMPTY, self::OP_IS_NOT_EMPTY), true)) {
84            $this->operator = $structure->op;
88
89        // For operators other than the empty/not empty ones, require value.
90        switch($this->operator) {
550            case self::OP_IS_EMPTY:
551                // Mimic PHP empty() behaviour for strings, '0' or ''.
552                $emptystring = self::unique_sql_parameter($params, '');
CDFDataHelper.php https://cdf.svn.codeplex.com/svn | PHP | 229 lines
1<?php
2
2
3require_once 'CDFFormat.php';
4require_once 'CDFExceptions.php';
19		if(is_null($value))
20			return ''; // null returns an empty string
21		if(is_string($value))
217	 * Returns true if the specified value is 'empty', i.e. an empty string, zero, false or null.
218	 * @remarks This wraps the PHP empty function where before PHP 5.5, empty() only accepts a variable and not an expression.
219	 * @param mixed $value
221	 */
222	public static function isEmpty($value)
223	{
225			return self::hasDateTime($value);
226		return empty($value);
227	}
condition.php https://bitbucket.org/moodle/moodle.git | PHP | 618 lines
52    /** @var string Operator: field is empty */
53    const OP_IS_EMPTY = 'isempty';
54
55    /** @var string Operator: field is not empty */
56    const OP_IS_NOT_EMPTY = 'isnotempty';
57
82                self::OP_DOES_NOT_CONTAIN, self::OP_IS_EQUAL_TO, self::OP_STARTS_WITH,
83                self::OP_ENDS_WITH, self::OP_IS_EMPTY, self::OP_IS_NOT_EMPTY), true)) {
84            $this->operator = $structure->op;
88
89        // For operators other than the empty/not empty ones, require value.
90        switch($this->operator) {
550            case self::OP_IS_EMPTY:
551                // Mimic PHP empty() behaviour for strings, '0' or ''.
552                $emptystring = self::unique_sql_parameter($params, '');
upgrade.php http://core.svn.wordpress.org/ | PHP | 114 lines
39$mysql_version  = $wpdb->db_version();
40$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
41if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
68	if ( !$mysql_compat && !$php_compat )
69		printf( __('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.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
70	elseif ( !$php_compat )
70	elseif ( !$php_compat )
71		printf( __('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.'), $wp_version, $required_php_version, $php_version );
72	elseif ( !$mysql_compat )
84<p><?php _e( 'The update process may take a little while, so please be patient.' ); ?></p>
85<p class="step"><a class="button" href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e( 'Update WordPress Database' ); ?></a></p>
86<?php
96	<p><?php _e( 'Your WordPress database has been successfully updated!' ); ?></p>
97	<p class="step"><a class="button" href="<?php echo $backto; ?>"><?php _e( 'Continue' ); ?></a></p>
98
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21