PageRenderTime 1928ms queryFilters 0ms Sphinxql 1724ms GetByIds 149ms meta 0ms repositoryFilters 14ms languageFilters 6ms sourceFilters 2ms

1,427,616 results for 'php empty' (1928 ms)

Source

Language

Repository

DooValidator.php git://github.com/darkredz/DooPHP.git | PHP | 1,221 lines
1<?php
2/**
78 * <?php
79 * //in protected/config/forms/example.php
80 * return array(
129	/**
130	 * Use PHP empty method to test for required (or optional)
131	 */
131	 */
132	const REQ_MODE_NULL_EMPTY = 'nullempty';
133
322
323					$vIsEmpty = ($this->requireMode == DooValidator::REQ_MODE_NULL_EMPTY && ($v === null || $v === '') ||
324								 $this->requireMode == DooValidator::REQ_MODE_NULL_ONLY  && $v === null) ? true : false;
923    /**
924     * Validate Not Empty. Input cannot be empty.
925     *
update-core.php git://pkgs.fedoraproject.org/wordpress | 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://git01.codeplex.com/officialwp | 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/dkrzos/phc.git | PHP | 881 lines
1<?php
2/**
26'wp-admin/import-mt.php',
27'wp-admin/import-rss.php',
28'wp-admin/import-textpattern.php',
646
647	$php_version    = phpversion();
648	$mysql_version  = $wpdb->db_version();
650	$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
651	$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
652	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
660	if ( !$mysql_compat && !$php_compat )
661		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 ) );
662	elseif ( !$php_compat )
662	elseif ( !$php_compat )
663		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 ) );
664	elseif ( !$mysql_compat )
update-core.php https://bitbucket.org/JacobTyler/fame4good-wp.git | PHP | 891 lines
1<?php
2/**
26'wp-admin/import-mt.php',
27'wp-admin/import-rss.php',
28'wp-admin/import-textpattern.php',
657
658	$php_version    = phpversion();
659	$mysql_version  = $wpdb->db_version();
661	$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
662	$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
663	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
671	if ( !$mysql_compat && !$php_compat )
672		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 ) );
673	elseif ( !$php_compat )
673	elseif ( !$php_compat )
674		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 ) );
675	elseif ( !$mysql_compat )
config.inc.php https://bitbucket.org/marcenuc/prestashop.git | PHP | 182 lines
1<?php
2/*
23*  @version  Release: $Revision: 7331 $
24*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
25*  International Registered Trademark & Property of PrestaShop SA
27
28require_once(dirname(__FILE__).'/defines.inc.php');
29$start_time = microtime(true);
33
34/* Improve PHP configuration to prevent issues */
35ini_set('upload_max_filesize', '100M');
43/* No settings file? goto installer... */
44if (!file_exists(dirname(__FILE__).'/settings.inc.php'))
45{
71	{
72		if (basename($_SERVER['SCRIPT_NAME']) == 'index.php' && empty($_SERVER['QUERY_STRING']))
73			$_SERVER['REQUEST_URI'] = dirname($_SERVER['SCRIPT_NAME']).'/';
config.inc.php https://bitbucket.org/yhjohn/ayanapure.com.git | PHP | 187 lines
1<?php
2/*
23*  @version  Release: $Revision: 7331 $
24*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
25*  International Registered Trademark & Property of PrestaShop SA
39
40/* Improve PHP configuration to prevent issues */
41ini_set('upload_max_filesize', '100M');
49/* No settings file? goto installer... */
50if (!file_exists(dirname(__FILE__).'/settings.inc.php'))
51{
58
59require_once(dirname(__FILE__).'/settings.inc.php');
60require_once(dirname(__FILE__).'/defines.inc.php');
77	{
78		if (basename($_SERVER['SCRIPT_NAME']) == 'index.php' && empty($_SERVER['QUERY_STRING']))
79			$_SERVER['REQUEST_URI'] = dirname($_SERVER['SCRIPT_NAME']).'/';
prelevement.php https://bitbucket.org/speedealing/speedealing.git | PHP | 577 lines
147
148	$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
149
288	print '</td>';
289	if ($object->type != 2 && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editinvoicedate&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDate'),1).'</a></td>';
290	print '</tr></table>';
315	print '</td>';
316	if ($object->type != 2 && $action != 'editpaymentterm' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editpaymentterm&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDate'),1).'</a></td>';
317	print '</tr></table>';
341	print '</td>';
342	if ($object->type != 2 && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;id='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
343	print '</tr></table>';
366	print '</td>';
367	if ($action != 'editmode' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
368	print '</tr></table>';
update-core.php https://bitbucket.org/KamranMackey/wordpress.git | PHP | 879 lines
1<?php
2/**
26'wp-admin/import-mt.php',
27'wp-admin/import-rss.php',
28'wp-admin/import-textpattern.php',
644
645	$php_version    = phpversion();
646	$mysql_version  = $wpdb->db_version();
648	$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
649	$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
650	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
658	if ( !$mysql_compat && !$php_compat )
659		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 ) );
660	elseif ( !$php_compat )
660	elseif ( !$php_compat )
661		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 ) );
662	elseif ( !$mysql_compat )
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']).'/';
update-core.php https://bitbucket.org/chimbien/mekongtest.git | PHP | 901 lines
1<?php
2/**
26'wp-admin/import-mt.php',
27'wp-admin/import-rss.php',
28'wp-admin/import-textpattern.php',
667
668	$php_version    = phpversion();
669	$mysql_version  = $wpdb->db_version();
671	$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
672	$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
673	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
681	if ( !$mysql_compat && !$php_compat )
682		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 ) );
683	elseif ( !$php_compat )
683	elseif ( !$php_compat )
684		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 ) );
685	elseif ( !$mysql_compat )
document.php https://github.com/zeert/dolibarr.git | PHP | 182 lines
1<?php
2/* Copyright (C) 2003-2004 Rodolphe Quiedeville  <rodolphe@quiedeville.org>
26
27require("../../main.inc.php");
28require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
28require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
29require_once(DOL_DOCUMENT_ROOT."/core/lib/propal.lib.php");
30require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
30require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
31require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
32require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
43$socid='';
44if (! empty($user->societe_id))
45{
126
127	$linkback='<a href="'.DOL_URL_ROOT.'/comm/propal/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
128
document.php https://github.com/zeert/dolibarr.git | PHP | 207 lines
1<?php
2/* Copyright (C) 2003-2007 Rodolphe Quiedeville  <rodolphe@quiedeville.org>
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.'/core/class/discount.class.php');
30require_once(DOL_DOCUMENT_ROOT."/core/lib/invoice.lib.php");
30require_once(DOL_DOCUMENT_ROOT."/core/lib/invoice.lib.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/class/html.formfile.class.php");
34
134
135		$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
136
checkbox.php https://bitbucket.org/acipriani/madeinapulia.com | PHP | 293 lines
1<?php
2/**
42    global $pagenow;
43    if ( $pagenow == 'post-new.php' && !empty( $field['data']['checked'] ) ) {
44        $checked = true;
140    $option_name = 'wpcf-fields';
141    if ( isset( $params['usermeta'] ) && !empty( $params['usermeta'] ) ) {
142        $option_name = 'wpcf-usermeta';
148            && $params['state'] == 'unchecked'
149            && empty( $params['field_value'] ) ) {
150        if ( empty( $params['#content'] ) ) {
150        if ( empty( $params['#content'] ) ) {
151            return '__wpcf_skip_empty';
152        }
170
171    // Check if 'save_empty' is yes and if value is 0 - set value to empty string
172    if ( isset( $params['field']['data']['save_empty'] )
checkbox.php https://github.com/ngocphuuit/wordpress-tax.git | PHP | 293 lines
1<?php
2/**
42    global $pagenow;
43    if ( $pagenow == 'post-new.php' && !empty( $field['data']['checked'] ) ) {
44        $checked = true;
140    $option_name = 'wpcf-fields';
141    if ( isset( $params['usermeta'] ) && !empty( $params['usermeta'] ) ) {
142        $option_name = 'wpcf-usermeta';
148            && $params['state'] == 'unchecked'
149            && empty( $params['field_value'] ) ) {
150        if ( empty( $params['#content'] ) ) {
150        if ( empty( $params['#content'] ) ) {
151            return '__wpcf_skip_empty';
152        }
170
171    // Check if 'save_empty' is yes and if value is 0 - set value to empty string
172    if ( isset( $params['field']['data']['save_empty'] )
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
EntityTrait.php git://github.com/cakephp/cakephp.git | PHP | 1,244 lines
1<?php
2declare(strict_types=1);
4/**
5 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
6 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
12 * @copyright     Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
13 * @link          https://cakephp.org CakePHP(tm) Project
14 * @since         3.0.0
102     * Map of fields in this entity that can be safely assigned, each
103     * field name points to a boolean indicating its status. An empty array
104     * means no fields are accessible
145     * Returns whether this entity contains a field named $field
146     * regardless of if it is empty.
147     *
373     *
374     * This is not working like the PHP `empty()` function. The method will
375     * return true for:
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	}
v1.php https://github.com/lux/sitellite.git | PHP | 1,539 lines
16 * @copyright  1997-2005 The PHP Group
17 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
18 * @version    CVS: $Id: v1.php,v 1.1 2005/07/02 21:12:31 lux Exp $
267 * @copyright  1997-2005 The PHP Group
268 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
269 * @version    Release: 1.4.0a12
1011                PEAR_PACKAGEFILE_ERROR_PHP5 =>
1012                    'Error, PHP5 token encountered, analysis should be in PHP5',
1013                PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND =>
1113                }
1114                if ($d['type'] == 'php' && !empty($d['name'])) {
1115                    $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED,
1116                        array('index' => $i, 'name' => $d['name']));
1117                } elseif ($d['type'] != 'php' && empty($d['name'])) {
1118                    $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPNAME,
Common.php https://github.com/lux/sitellite.git | PHP | 1,552 lines
1<?php
2//
10// | available at through the world-wide-web at                           |
11// | http://www.php.net/license/2_02.txt.                                 |
12// | If you did not receive a copy of the PHP license and are unable to   |
13// | obtain it through the world-wide-web, please send a note to          |
14// | license@php.net so we can mail you a copy immediately.               |
15// +----------------------------------------------------------------------+
1064                }
1065                if ($d['type'] == 'php' && !empty($d['name'])) {
1066                    $warnings[] = "dependency $i: name ignored for php type dependencies";
1066                    $warnings[] = "dependency $i: name ignored for php type dependencies";
1067                } elseif ($d['type'] != 'php' && empty($d['name'])) {
1068                    $errors[] = "dependency $i: missing name";
1481        $request .= "Host: $host:$port\r\n".
1482            "User-Agent: PHP/".PHP_VERSION."\r\n";
1483        if ($proxy_host != '' && $proxy_user != '') {
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21