PageRenderTime 480ms queryFilters 1ms Sphinxql 162ms app.CodeModel.GetByIds 222ms findMatchingLines 72ms GetByIds 294ms meta 0ms repositoryFilters 4ms languageFilters 1ms sourceFilters 3ms

421,407 results for 'php empty repo:nosen/jelly2' (480 ms)

Source

Language

Repository

plugin.php https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail | PHP | 239 lines
1<?php
2
3/**
4 * plugin.php
5 *
10 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
11 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
12 * @version $Id: plugin.php 10594 2006-01-28 19:12:19Z kink $
16/** Everything needs global.. */
17require_once(SM_PATH . 'functions/global.php');
18require_once(SM_PATH . 'config/config.php');
18require_once(SM_PATH . 'config/config.php');
19require_once(SM_PATH . 'functions/prefs.php');
20
202  /**
203   * check if variable is empty. if var is not set, php empty 
204   * returns true without error notice.
update-core.php http://core.svn.wordpress.org/ | PHP | 545 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');});
390	<script type="text/javascript">
391	window.location = '<?php echo admin_url( 'about.php?upgraded' ); ?>';
392	</script>
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>
ResourceManager.php https://bitbucket.org/cviolette/sugarcrm.git | PHP | 154 lines
1<?php
2/*********************************************************************************
38/**
39 * ResourceManager.php
40 * This class is responsible for resource management of SQL queries, file usage, etc.
75	//Check if config.php exists
76	if(!file_exists('config.php') || empty($module)) {
77	   return false;	
80    if($module == 'Soap') {
81      require_once('include/resource/Observers/SoapResourceObserver.php');
82      $observer = new SoapResourceObserver('Soap');      	
83    } else {
84      require_once('include/resource/Observers/WebResourceObserver.php');
85      $observer = new WebResourceObserver($module);    	
88	//Load config
89	if(!empty($observer->module)) {
90		$limit = 0;
update-core.php https://bitbucket.org/crafttheweb/wordpress-fold.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>
note.php https://bitbucket.org/speedealing/speedealing.git | PHP | 161 lines
22/**
23 *	\file       htdocs/comm/propal/note.php
24 *	\ingroup    propale
27
28require '../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.'/propal/class/propal.class.php';
29require_once DOL_DOCUMENT_ROOT.'/propal/class/propal.class.php';
30require_once DOL_DOCUMENT_ROOT.'/propal/lib/propal.lib.php';
31
73
74if (!(empty($id)) || ! empty($ref))
75{
89
90			$linkback = '<a href="'.DOL_URL_ROOT.'/comm/propal/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans('BackToList').'</a>';
91
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'] )
book.var.php https://github.com/ssbalakumar/web-php.git | PHP | 90 lines
1<?php
2include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
9    0 => 'index.php',
10    1 => 'PHP Manual',
11  ),
18  array (
19    0 => 'book.var.php',
20    1 => '変数操作',
23  array (
24    0 => 'refs.basic.vartype.php',
25    1 => '変数・データ型関連',
28  array (
29    0 => 'class.reflectionexception.php',
30    1 => 'ReflectionException',
89
90<ul class="chunklist chunklist_book"><li><a href="intro.var.php">導入</a></li><li><a href="var.setup.php">インストール/設定</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="var.requirements.php">要件</a></li><li><a href="var.installation.php">インストール手順</a></li><li><a href="var.configuration.php">実行時設定</a></li><li><a href="var.resources.php">リソース型</a></li></ul></li><li><a href="var.constants.php">定義済み定数</a></li><li><a href="ref.var.php">変数操作 関数</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.boolval.php">boolval</a> — 変数の boolean としての値を取得する</li><li><a href="function.debug-zval-dump.php">debug_zval_dump</a> — 内部的な Zend の値を表す文字列をダンプする</li><li><a href="function.doubleval.php">doubleval</a> — floatval のエイリアス</li><li><a href="function.empty.php">empty</a> — 変数が空であるかどうかを検査する</li><li><a href="function.floatval.php">floatval</a> — 変数の float 値を取得する</li><li><a href="function.get-defined-vars.php">get_defined_vars</a> — 全ての定義済の変数を配列で返す</li><li><a href="function.get-resource-type.php">get_resource_type</a> — リソース型を返す</li><li><a href="function.gettype.php">gettype</a> — 変数の型を取得する</li><li><a href="function.import-request-variables.php">import_request_variables</a> — GET/POST/Cookie 変数をグローバルスコープにインポートする</li><li><a href="function.intval.php">intval</a> — 変数の整数としての値を取得する</li><li><a href="function.is-array.php">is_array</a> — 変数が配列かどうかを検査する</li><li><a href="function.is-bool.php">is_bool</a> — 変数が boolean であるかを調べる</li><li><a href="function.is-callable.php">is_callable</a> — 引数が、関数としてコール可能な構造であるかどうかを調べる</li><li><a href="function.is-double.php">is_double</a> — is_float のエイリアス</li><li><a href="function.is-float.php">is_float</a> — 変数の型が float かどうか調べる</li><li><a href="function.is-int.php">is_int</a> — 変数が整数型かどうかを検査する</li><li><a href="function.is-integer.php">is_integer</a> — is_int のエイリアス</li><li><a href="function.is-long.php">is_long</a> — is_int のエイリアス</li><li><a href="function.is-null.php">is_null</a> — 変数が NULL かどうか調べる</li><li><a href="function.is-numeric.php">is_numeric</a> — 変数が数字または数値形式の文字列であるかを調べる</li><li><a href="function.is-object.php">is_object</a> — 変数がオブジェクトかどうかを検査する</li><li><a href="function.is-real.php">is_real</a> — is_float のエイリアス</li><li><a href="function.is-resource.php">is_resource</a> — 変数がリソースかどうかを調べる</li><li><a href="function.is-scalar.php">is_scalar</a> — 変数がスカラかどうかを調べる</li><li><a href="function.is-string.php">is_string</a> — 変数の型が文字列かどうかを調べる</li><li><a href="function.isset.php">isset</a> — 変数がセットされていること、そして NULL でないことを検査する</li><li><a href="function.print-r.php">print_r</a> — 指定した変数に関する情報を解りやすく出力する</li><li><a href="function.serialize.php">serialize</a> — 値の保存可能な表現を生成する</li><li><a href="function.settype.php">settype</a> — 変数の型をセットする</li><li><a href="function.strval.php">strval</a> — 変数の文字列としての値を取得する</li><li><a href="function.unserialize.php">unserialize</a> — 保存用表現から PHP の値を生成する</li><li><a href="function.unset.php">unset</a> — 指定した変数の割当を解除する</li><li><a href="function.var-dump.php">var_dump</a> — 変数に関する情報をダンプする</li><li><a href="function.var-export.php">var_export</a> — 変数の文字列表現を出力または返す</li></ul></li></ul></div><?php manual_footer(); ?>
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'] )
2009-02-04-phps-empty-in-place-of-isset.markdown https://github.com/johnantoni/red91.com.git | Unknown | 18 lines
2layout: post
3title: php's empty() in place of isset()
4category: php
8
9[Using PHP's empty() Instead of isset() and count()](http://www.thefutureoftheweb.com/blog/using-php-empty-instead-of-isset-count)
10
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:
update-core.php https://bitbucket.org/stephenharris/stephenharris.git | PHP | 765 lines
52	$form_action = 'update-core.php?action=do-core-upgrade';
53	$php_version    = phpversion();
54	$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 ) )
71				/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */
72				$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 );
73			elseif ( !$php_compat )
74				/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
75				$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 );
76			elseif ( !$mysql_compat )
132			$('dismissed-updates').show();
133			$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
134			$('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');});
class-wp-automatic-updater.php https://bitbucket.org/stephenharris/stephenharris.git | PHP | 923 lines
1<?php
2/**
13 * @since 3.7.0
14 * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
15 */
157		else
158			$update = ! empty( $item->autoupdate );
159
190
191			$php_compat = version_compare( phpversion(), $item->php_version, '>=' );
192			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
196
197			if ( ! $php_compat || ! $mysql_compat )
198				return false;
219		// See if we need to notify users of a core update.
220		$notify = ! empty( $item->notify_email );
221
update-core.php https://bitbucket.org/stephenharris/stephenharris.git | PHP | 1,257 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 );
login.php https://github.com/alx/alexgirard.com-blog.git | PHP | 226 lines
1<?php
2/**
7
8// add OpenID input field to wp-login.php
9add_action( 'login_head', 'openid_wp_login_head');
33		finish_openid('login');
34	} else if (!empty($_POST['openid_identifier'])) {
35		openid_start_login( $_POST['openid_identifier'], 'login', array('redirect_to' => $_REQUEST['redirect_to']), site_url('/wp-login.php', 'login_post'));
41		
42	if ($self != 'wp-login.php') return;
43
64/**
65 * Add OpenID input field to wp-login.php
66 *
192		
193	if ($self == 'wp-login.php' && !empty($_POST['openid_identifier'])) {
194		wp_signon(array('user_login'=>'openid', 'user_password'=>'openid'));
login.php https://github.com/cuano/pressmark.git | PHP | 225 lines
1<?php
2/**
7
8// add OpenID input field to wp-login.php
9add_action( 'login_head', 'openid_wp_login_head');
33		finish_openid('login');
34	} else if (!empty($_POST['openid_identifier'])) {
35		openid_start_login( $_POST['openid_identifier'], 'login', array('redirect_to' => $_REQUEST['redirect_to']), site_url('/wp-login.php', 'login_post'));
41		
42	if ($self != 'wp-login.php') return;
43
64/**
65 * Add OpenID input field to wp-login.php
66 *
192		
193	if ($self == 'wp-login.php' && !empty($_POST['openid_identifier'])) {
194		wp_signon(array('user_login'=>'openid', 'user_password'=>'openid'));
update-core.php https://github.com/scottbale/kirkwoodcoc.git | PHP | 779 lines
52	$form_action = 'update-core.php?action=do-core-upgrade';
53	$php_version    = phpversion();
54	$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 ) )
71				/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */
72				$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 );
73			elseif ( !$php_compat )
74				/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
75				$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 );
76			elseif ( !$mysql_compat )
132			$('dismissed-updates').show();
133			$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
134			$('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');});
class-wp-automatic-updater.php https://github.com/scottbale/kirkwoodcoc.git | PHP | 913 lines
1<?php
2/**
13 * @since 3.7.0
14 * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
15 */
153		else
154			$update = ! empty( $item->autoupdate );
155
186
187			$php_compat = version_compare( phpversion(), $item->php_version, '>=' );
188			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
192
193			if ( ! $php_compat || ! $mysql_compat )
194				return false;
214		// See if we need to notify users of a core update.
215		$notify = ! empty( $item->notify_email );
216
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21